aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-01 23:43:32 -0800
committerJunio C Hamano <gitster@pobox.com>2008-03-01 23:52:13 -0800
commit2efb3b061709bd204f11d54c177dae89e4af0f67 (patch)
tree176701656ed7bc90a175f31b944b399c3b7ebdf8 /diff.c
parentb66fde9a287f64ed81d4d4a1639997ad5eedb432 (diff)
downloadgit-2efb3b061709bd204f11d54c177dae89e4af0f67.tar.gz
git-2efb3b061709bd204f11d54c177dae89e4af0f67.tar.xz
Clean up find_unique_abbrev() callers
Now find_unique_abbrev() never returns NULL, there is no need for callers to prepare for seeing NULL and fall back to giving the full 40-hexdigits. While we are at it, drop "..." in the "git reset" output that reports the location of the new HEAD, between the abbreviated commit object name and the one line commit summary. Because we are always showing the HEAD (which cannot be missing!), we never had a case where we show the full 40 hexdigits that is not followed by three dots, and these three dots were stealing 3 columns from the precious horizontal screen real estate out of 80 that can better be used for the one line commit summary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index ad1616423..b80f656fb 100644
--- a/diff.c
+++ b/diff.c
@@ -2581,8 +2581,6 @@ const char *diff_unique_abbrev(const unsigned char *sha1, int len)
return sha1_to_hex(sha1);
abbrev = find_unique_abbrev(sha1, len);
- if (!abbrev)
- return sha1_to_hex(sha1);
abblen = strlen(abbrev);
if (abblen < 37) {
static char hex[41];