Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-12 10:24:42 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-12 10:24:42 +0300
commit687004b512d30daeff0e64dc718f803433d73329 (patch)
tree3f3aaaa2de75ecf63178c9b82029df598a803c9b /builtin-checkout.c
parent4fc988efe66ea079c926b1f01bf563a946b7797f (diff)
parent3442ea4a75a3c76f65efac71b414584f765e5a99 (diff)
Merge branch 'jc/maint-do-not-switch-to-non-commit' into maint
* jc/maint-do-not-switch-to-non-commit: git checkout: do not allow switching to a tree-ish that is not a commit
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 c2c05613b6..b5dd9c07b4 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -681,8 +681,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
argv++;
argc--;
+ new.name = arg;
if ((new.commit = lookup_commit_reference_gently(rev, 1))) {
- new.name = arg;
setup_branch_path(&new);
if (resolve_ref(new.path, rev, 1, NULL))
new.commit = lookup_commit_reference(rev);