summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorKevin Bracey <kevin@bracey.fi>2013-04-08 15:53:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-08 23:25:50 (GMT)
commitd6e1466095b54b613acd2ecfd6b72d06b07d2dc3 (patch)
tree5a26b8a2a2706487ab6febccc150fb8cbad30103 /builtin/checkout.c
parent52a3e011c779456e63b6274af0024eeb92dd7888 (diff)
downloadgit-d6e1466095b54b613acd2ecfd6b72d06b07d2dc3.zip
git-d6e1466095b54b613acd2ecfd6b72d06b07d2dc3.tar.gz
git-d6e1466095b54b613acd2ecfd6b72d06b07d2dc3.tar.bz2
checkout: abbreviate hash in suggest_reattach
After printing the list of left-behind commits (with abbreviated hashes), use an abbreviated hash in the suggested 'git branch' command; there's no point in outputting a full 40-character hex string in some friendly advice. Signed-off-by: Kevin Bracey <kevin@bracey.fi> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index f8033f4..eb51872 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -729,7 +729,7 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
"If you want to keep them by creating a new branch, "
"this may be a good time\nto do so with:\n\n"
" git branch new_branch_name %s\n\n"),
- sha1_to_hex(commit->object.sha1));
+ find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
}
/*