From 2efb3b061709bd204f11d54c177dae89e4af0f67 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 1 Mar 2008 23:43:32 -0800 Subject: 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 --- diff.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'diff.c') diff --git a/diff.c b/diff.c index ad16164232..b80f656fb9 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]; -- cgit 1.2.3-korg