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>
Kevin Bracey committed
Apr 8, 2013 at 18:53 UTC
d6e1466095b54b613acd2ecfd6b72d06b07d2dc3
1 file changed
+1
-1
builtin/checkout.c
+1
-1
@@ -729,7 +729,7 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
729
"If you want to keep them by creating a new branch, "
730
"this may be a good time\nto do so with:\n\n"
731
" git branch new_branch_name %s\n\n"),
732
- sha1_to_hex(commit->object.sha1));
732
+ find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
733
}
734
735
/*