Merge branch 'kb/co-orphan-suggestion-short-sha1'
authorJunio C Hamano <gitster@pobox.com>
Thu, 18 Apr 2013 18:46:33 +0000 (11:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Apr 2013 18:46:33 +0000 (11:46 -0700)
Update the informational message when "git checkout" leaves the
detached head state.

* kb/co-orphan-suggestion-short-sha1:
checkout: abbreviate hash in suggest_reattach

builtin/checkout.c
index f8033f446e8f9ef1807aa28c2f9eca4e821c42c9..eb51872347d9b7d3e81c37d9ddb4272a99f2b75f 100644 (file)
@@ -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));
 }
 
 /*