MCPcopy Create free account
hub / github.com/git/git / builtin_diff_combined

Function builtin_diff_combined

builtin/diff.c:211–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static void builtin_diff_combined(struct rev_info *revs,
212 int argc, const char **argv UNUSED,
213 struct object_array_entry *ent,
214 int ents, int first_non_parent)
215{
216 struct oid_array parents = OID_ARRAY_INIT;
217 int i;
218
219 if (argc > 1)
220 usage(builtin_diff_usage);
221
222 if (first_non_parent < 0)
223 die(_("no merge given, only parents."));
224 if (first_non_parent >= ents)
225 BUG("first_non_parent out of range: %d", first_non_parent);
226
227 diff_merges_set_dense_combined_if_unset(revs);
228
229 for (i = 0; i < ents; i++) {
230 if (i != first_non_parent)
231 oid_array_append(&parents, &ent[i].item->oid);
232 }
233 diff_tree_combined(&ent[first_non_parent].item->oid, &parents, revs);
234 oid_array_clear(&parents);
235}
236
237static void refresh_index_quietly(void)
238{

Callers 1

cmd_diffFunction · 0.85

Calls 6

oid_array_appendFunction · 0.85
diff_tree_combinedFunction · 0.85
oid_array_clearFunction · 0.85
usageFunction · 0.50
dieFunction · 0.50

Tested by

no test coverage detected