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

Function commit_patch_id

patch-ids.c:14–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14int commit_patch_id(struct commit *commit, struct diff_options *options,
15 struct object_id *oid, int diff_header_only)
16{
17 if (!patch_id_defined(commit))
18 return -1;
19
20 if (commit->parents)
21 diff_tree_oid(&commit->parents->item->object.oid,
22 &commit->object.oid, "", options);
23 else
24 diff_root_tree_oid(&commit->object.oid, "", options);
25 diffcore_std(options);
26 return diff_flush_patch_id(options, oid, diff_header_only);
27}
28
29/*
30 * When we cannot load the full patch-id for both commits for whatever

Callers 3

patch_id_neqFunction · 0.85
init_patch_id_entryFunction · 0.85
prepare_basesFunction · 0.85

Calls 5

patch_id_definedFunction · 0.85
diff_tree_oidFunction · 0.85
diff_root_tree_oidFunction · 0.85
diffcore_stdFunction · 0.85
diff_flush_patch_idFunction · 0.85

Tested by

no test coverage detected