Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-02 10:43:32 +0300
committerJunio C Hamano <gitster@pobox.com>2008-03-02 10:52:13 +0300
commit2efb3b061709bd204f11d54c177dae89e4af0f67 (patch)
tree176701656ed7bc90a175f31b944b399c3b7ebdf8 /builtin-send-pack.c
parentb66fde9a287f64ed81d4d4a1639997ad5eedb432 (diff)
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 'builtin-send-pack.c')
-rw-r--r--builtin-send-pack.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index b0cfae83fc..930e0fb3fd 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -264,9 +264,7 @@ static void print_ref_status(char flag, const char *summary, struct ref *to, str
static const char *status_abbrev(unsigned char sha1[20])
{
- const char *abbrev;
- abbrev = find_unique_abbrev(sha1, DEFAULT_ABBREV);
- return abbrev ? abbrev : sha1_to_hex(sha1);
+ return find_unique_abbrev(sha1, DEFAULT_ABBREV);
}
static void print_ok_ref_status(struct ref *ref)