Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
checkout: check_linked_checkout: improve "already checked out" aesthetic
[gitweb.git]
/
builtin
/
checkout.c
diff --git
a/builtin/checkout.c
b/builtin/checkout.c
index 177ad6a2d7c87cb0e9e2f569e05f26a28f78ee6f..de6619f4c503792ae727e3862a36712ca0e06e6a 100644
(file)
--- a/
builtin/checkout.c
+++ b/
builtin/checkout.c
@@
-909,6
+909,7
@@
static void check_linked_checkout(const char *branch, const char *id)
} else
strbuf_addstr(&gitdir, get_git_common_dir());
skip_prefix(branch, "refs/heads/", &branch);
+ strbuf_strip_suffix(&gitdir, ".git");
die(_("'%s' is already checked out at '%s'"), branch, gitdir.buf);
done:
strbuf_release(&path);