line |
true |
false |
branch |
43
|
0 |
2 |
if (!git_oid_equal(&head2idx->old_file.id, &head2idx->new_file.id)) |
85
|
1 |
0 |
if (!git_oid_equal(&idx2wd->old_file.id, &idx2wd->new_file.id)) { |
89
|
0 |
1 |
if (git_oid_is_zero(&idx2wd->old_file.id) && |
|
0 |
0 |
if (git_oid_is_zero(&idx2wd->old_file.id) && |
90
|
0 |
0 |
diff->old_src == GIT_ITERATOR_WORKDIR && |
96
|
1 |
0 |
if (git_oid_is_zero(&idx2wd->new_file.id) && |
|
1 |
0 |
if (git_oid_is_zero(&idx2wd->new_file.id) && |
97
|
1 |
0 |
diff->new_src == GIT_ITERATOR_WORKDIR && |
103
|
0 |
1 |
if (!git_oid_equal(&idx2wd->old_file.id, &idx2wd->new_file.id)) |
125
|
54 |
12 |
if (!(status->opts.flags & GIT_STATUS_OPT_EXCLUDE_SUBMODULES)) |
129
|
5 |
7 |
if (head2idx) { |
130
|
3 |
2 |
if (head2idx->status != GIT_DELTA_ADDED && |
|
3 |
0 |
if (head2idx->status != GIT_DELTA_ADDED && |
133
|
2 |
0 |
if (head2idx->status != GIT_DELTA_DELETED && |
|
2 |
0 |
if (head2idx->status != GIT_DELTA_DELETED && |
137
|
7 |
0 |
if (idx2wd) { |
138
|
7 |
0 |
if (idx2wd->status != GIT_DELTA_ADDED && |
|
7 |
0 |
if (idx2wd->status != GIT_DELTA_ADDED && |
141
|
0 |
0 |
if (idx2wd->status != GIT_DELTA_DELETED && |
|
0 |
0 |
if (idx2wd->status != GIT_DELTA_DELETED && |
157
|
30 |
36 |
if (head2idx) |
160
|
46 |
20 |
if (idx2wd) |
174
|
0 |
66 |
if (!status_is_included(status, head2idx, idx2wd)) |
178
|
0 |
66 |
GIT_ERROR_CHECK_ALLOC(status_entry); |
196
|
8 |
1 |
delta_a = entry_a->index_to_workdir ? entry_a->index_to_workdir : |
198
|
8 |
1 |
delta_b = entry_b->index_to_workdir ? entry_b->index_to_workdir : |
201
|
0 |
9 |
if (!delta_a && delta_b) |
|
0 |
0 |
if (!delta_a && delta_b) |
203
|
9 |
0 |
if (delta_a && !delta_b) |
|
0 |
9 |
if (delta_a && !delta_b) |
205
|
0 |
9 |
if (!delta_a && !delta_b) |
|
0 |
0 |
if (!delta_a && !delta_b) |
226
|
0 |
63 |
if (!(status = git__calloc(1, sizeof(git_status_list)))) |
229
|
0 |
63 |
entrycmp = index->ignore_case ? status_entry_icmp : status_entry_cmp; |
231
|
0 |
63 |
if (git_vector_init(&status->paired, 0, entrycmp) < 0) { |
241
|
0 |
63 |
if (!opts) |
244
|
0 |
63 |
GIT_ERROR_CHECK_VERSION(opts, GIT_STATUS_OPTIONS_VERSION, "git_status_options"); |
246
|
0 |
63 |
if (opts->show > GIT_STATUS_SHOW_WORKDIR_ONLY) { |
251
|
0 |
63 |
if ((opts->flags & GIT_STATUS_OPT_NO_REFRESH) != 0 && |
|
0 |
0 |
if ((opts->flags & GIT_STATUS_OPT_NO_REFRESH) != 0 && |
272
|
63 |
0 |
opts ? opts->show : GIT_STATUS_SHOW_INDEX_AND_WORKDIR; |
274
|
63 |
0 |
unsigned int flags = opts ? opts->flags : GIT_STATUS_OPT_DEFAULTS; |
278
|
0 |
63 |
if (status_validate_options(opts) < 0) |
281
|
63 |
0 |
if ((error = git_repository__ensure_not_bare(repo, "status")) < 0 || |
|
0 |
63 |
if ((error = git_repository__ensure_not_bare(repo, "status")) < 0 || |
285
|
63 |
0 |
if (opts != NULL && opts->baseline != NULL) { |
|
0 |
63 |
if (opts != NULL && opts->baseline != NULL) { |
289
|
14 |
49 |
if ((error = git_repository_head_tree(&head, repo)) < 0) { |
290
|
14 |
0 |
if (error != GIT_ENOTFOUND && error != GIT_EUNBORNBRANCH) |
|
0 |
14 |
if (error != GIT_ENOTFOUND && error != GIT_EUNBORNBRANCH) |
302
|
0 |
63 |
GIT_ERROR_CHECK_ALLOC(status); |
304
|
63 |
0 |
if (opts) { |
312
|
12 |
51 |
if ((flags & GIT_STATUS_OPT_INCLUDE_UNTRACKED) != 0) |
314
|
4 |
59 |
if ((flags & GIT_STATUS_OPT_INCLUDE_IGNORED) != 0) |
316
|
0 |
63 |
if ((flags & GIT_STATUS_OPT_INCLUDE_UNMODIFIED) != 0) |
318
|
1 |
62 |
if ((flags & GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS) != 0) |
320
|
0 |
63 |
if ((flags & GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH) != 0) |
322
|
1 |
62 |
if ((flags & GIT_STATUS_OPT_RECURSE_IGNORED_DIRS) != 0) |
324
|
7 |
56 |
if ((flags & GIT_STATUS_OPT_EXCLUDE_SUBMODULES) != 0) |
326
|
0 |
63 |
if ((flags & GIT_STATUS_OPT_UPDATE_INDEX) != 0) |
328
|
0 |
63 |
if ((flags & GIT_STATUS_OPT_INCLUDE_UNREADABLE) != 0) |
330
|
0 |
63 |
if ((flags & GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED) != 0) |
333
|
0 |
63 |
if ((flags & GIT_STATUS_OPT_RENAMES_FROM_REWRITES) != 0) |
339
|
63 |
0 |
if (opts != NULL && opts->rename_threshold != 0) |
|
0 |
63 |
if (opts != NULL && opts->rename_threshold != 0) |
342
|
62 |
1 |
if (show != GIT_STATUS_SHOW_WORKDIR_ONLY) { |
343
|
0 |
62 |
if ((error = git_diff_tree_to_index( |
347
|
2 |
60 |
if ((flags & GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX) != 0 && |
|
0 |
2 |
if ((flags & GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX) != 0 && |
352
|
62 |
1 |
if (show != GIT_STATUS_SHOW_INDEX_ONLY) { |
353
|
0 |
62 |
if ((error = git_diff_index_to_workdir( |
358
|
3 |
59 |
if ((flags & GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR) != 0 && |
|
0 |
3 |
if ((flags & GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR) != 0 && |
365
|
0 |
63 |
if (error < 0) |
368
|
0 |
63 |
if (flags & GIT_STATUS_OPT_SORT_CASE_SENSITIVELY) |
370
|
0 |
63 |
if (flags & GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY) |
373
|
5 |
58 |
if ((flags & |
381
|
0 |
63 |
if (error < 0) { |
388
|
63 |
0 |
if (opts == NULL || opts->baseline != head) |
|
49 |
14 |
if (opts == NULL || opts->baseline != head) |
397
|
0 |
56 |
GIT_ASSERT_ARG_WITH_RETVAL(status, 0); |
404
|
0 |
54 |
GIT_ASSERT_ARG_WITH_RETVAL(status, NULL); |
411
|
0 |
63 |
if (status == NULL) |
434
|
0 |
7 |
if ((error = git_status_list_new(&status, repo, opts)) < 0) { |
438
|
6 |
1 |
git_vector_foreach(&status->paired, i, status_entry) { |
440
|
4 |
2 |
status_entry->head_to_index->old_file.path : |
443
|
6 |
0 |
if ((error = cb(path, status_entry->status, payload)) != 0) { |
475
|
0 |
0 |
strcomp = (sfi->wildmatch_flags & WM_CASEFOLD) ? git__strcasecmp : git__strcmp; |
478
|
0 |
0 |
(strcomp(sfi->expected, path) != 0 && |
498
|
0 |
0 |
GIT_ASSERT_ARG(status_flags); |
499
|
0 |
0 |
GIT_ASSERT_ARG(repo); |
500
|
0 |
0 |
GIT_ASSERT_ARG(path); |
502
|
0 |
0 |
if ((error = git_repository_index__weakptr(&index, repo)) < 0) |
505
|
0 |
0 |
if ((sfi.expected = git__strdup(path)) == NULL) |
507
|
0 |
0 |
if (index->ignore_case) |
522
|
0 |
0 |
if (error < 0 && sfi.ambiguous) { |
|
0 |
0 |
if (error < 0 && sfi.ambiguous) { |
528
|
0 |
0 |
if (!error && !sfi.count) { |
|
0 |
0 |
if (!error && !sfi.count) { |
551
|
0 |
0 |
GIT_INIT_STRUCTURE_FROM_TEMPLATE( |
566
|
0 |
0 |
GIT_ASSERT_ARG(out); |
568
|
0 |
0 |
GIT_ERROR_CHECK_VERSION(out, GIT_DIFF_PERFDATA_VERSION, "git_diff_perfdata"); |
573
|
0 |
0 |
if (status->head2idx) { |
577
|
0 |
0 |
if (status->idx2wd) { |