MCPcopy Index your code
hub / github.com/git/git / verify_notes_filepair

Function verify_notes_filepair

notes-merge.c:54–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static int verify_notes_filepair(struct diff_filepair *p, struct object_id *oid)
55{
56 switch (p->status) {
57 case DIFF_STATUS_MODIFIED:
58 assert(p->one->mode == p->two->mode);
59 assert(!is_null_oid(&p->one->oid));
60 assert(!is_null_oid(&p->two->oid));
61 break;
62 case DIFF_STATUS_ADDED:
63 assert(is_null_oid(&p->one->oid));
64 break;
65 case DIFF_STATUS_DELETED:
66 assert(is_null_oid(&p->two->oid));
67 break;
68 default:
69 return -1;
70 }
71 assert(!strcmp(p->one->path, p->two->path));
72 return path_to_oid(p->one->path, oid);
73}
74
75static struct notes_merge_pair *find_notes_merge_pair_pos(
76 struct notes_merge_pair *list, int len, struct object_id *obj,

Callers 2

diff_tree_remoteFunction · 0.85
diff_tree_localFunction · 0.85

Calls 2

is_null_oidFunction · 0.85
path_to_oidFunction · 0.85

Tested by

no test coverage detected