diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-11 23:24:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-11 23:24:42 -0800 |
commit | 687004b512d30daeff0e64dc718f803433d73329 (patch) | |
tree | 3f3aaaa2de75ecf63178c9b82029df598a803c9b /builtin-checkout.c | |
parent | 4fc988efe66ea079c926b1f01bf563a946b7797f (diff) | |
parent | 3442ea4a75a3c76f65efac71b414584f765e5a99 (diff) | |
download | git-687004b512d30daeff0e64dc718f803433d73329.tar.gz |
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.c | 2 |
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); |