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

Function diff_abbrev_oid

diff.c:4842–4856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4840}
4841
4842static const char *diff_abbrev_oid(const struct object_id *oid, int abbrev)
4843{
4844 if (startup_info->have_repository)
4845 return repo_find_unique_abbrev(the_repository, oid, abbrev);
4846 else {
4847 char *hex = oid_to_hex(oid);
4848 if (abbrev < 0)
4849 abbrev = FALLBACK_DEFAULT_ABBREV;
4850 if (abbrev > the_hash_algo->hexsz)
4851 BUG("oid abbreviation out of range: %d", abbrev);
4852 if (abbrev)
4853 hex[abbrev] = '\0';
4854 return hex;
4855 }
4856}
4857
4858static void fill_metainfo(struct strbuf *msg,
4859 const char *name,

Callers 2

fill_metainfoFunction · 0.85
diff_aligned_abbrevFunction · 0.85

Calls 2

repo_find_unique_abbrevFunction · 0.85
oid_to_hexFunction · 0.85

Tested by

no test coverage detected