checkout: check_linked_checkout: improve "already checked out" aesthetic

When check_linked_checkout() discovers that the branch is already checked out elsewhere, it emits the diagnostic: 'blorp' is already checked out at '/some/path/.git' which is misleading since "checked out at" implies the working tree, but ".git" is the location of the repository administrative files. Fix by dropping ".git" from the message. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Jul 17, 2015 at 19:00 UTC 39e69e151951040b952b3c81d2ee40b827fd9abf
1 file changed +1
builtin/checkout.c
+1
@@ -909,6 +909,7 @@ static void check_linked_checkout(const char *branch, const char *id)
909 } else
910 strbuf_addstr(&gitdir, get_git_common_dir());
911 skip_prefix(branch, "refs/heads/", &branch);
912 + strbuf_strip_suffix(&gitdir, ".git");
913 die(_("'%s' is already checked out at '%s'"), branch, gitdir.buf);
914 done:
915 strbuf_release(&path);