summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-10-03 23:47:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-04 04:03:14 (GMT)
commit8e3f52d77854a19cb3fd2adee40be84c8a8bdacc (patch)
treed342eca5c1880a5286108a8e12e71eee8ca2b44a /submodule.c
parente6c587c733b4634030b353f4024794b08bc86892 (diff)
downloadgit-8e3f52d77854a19cb3fd2adee40be84c8a8bdacc.zip
git-8e3f52d77854a19cb3fd2adee40be84c8a8bdacc.tar.gz
git-8e3f52d77854a19cb3fd2adee40be84c8a8bdacc.tar.bz2
find_unique_abbrev: move logic out of get_short_sha1()
The get_short_sha1() is only about reading short sha1s; we do call it in a loop to check "is this long enough" for each object, but otherwise it should not need to know about things like our default_abbrev setting. So instead of asking it to set default_automatic_abbrev as a side-effect, let's just have find_unique_abbrev() pick the right place to start its loop. This requires a separate approximate_object_count() function, but that naturally belongs with the rest of sha1_file.c. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
0 files changed, 0 insertions, 0 deletions