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

Function builtin_diff_blobs

builtin/diff.c:115–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static void builtin_diff_blobs(struct rev_info *revs,
116 int argc, const char **argv UNUSED,
117 struct object_array_entry **blob)
118{
119 const unsigned mode = canon_mode(S_IFREG | 0644);
120
121 if (argc > 1)
122 usage(builtin_diff_usage);
123
124 if (blob[0]->mode == S_IFINVALID)
125 blob[0]->mode = mode;
126
127 if (blob[1]->mode == S_IFINVALID)
128 blob[1]->mode = mode;
129
130 stuff_change(&revs->diffopt,
131 blob[0]->mode, blob[1]->mode,
132 &blob[0]->item->oid, &blob[1]->item->oid,
133 1, 1,
134 blob_path(blob[0]), blob_path(blob[1]));
135 diffcore_std(&revs->diffopt);
136 diff_flush(&revs->diffopt);
137}
138
139static void builtin_diff_index(struct rev_info *revs,
140 int argc, const char **argv)

Callers 1

cmd_diffFunction · 0.85

Calls 6

canon_modeFunction · 0.85
stuff_changeFunction · 0.85
blob_pathFunction · 0.85
diffcore_stdFunction · 0.85
diff_flushFunction · 0.85
usageFunction · 0.50

Tested by

no test coverage detected