diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-20 20:28:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-20 20:28:51 -0800 |
commit | b3ce9a0874cc7ec1d0fd5ead97d78a428d1fdd75 (patch) | |
tree | 246b4b53f6dbdc537a000e785b889d028ecf33f1 | |
parent | 41905647fc6c94632b48b7caf65eaf3ae18f6d70 (diff) | |
parent | 72a144e213b67621a4c3305dd9a07a200917fbc9 (diff) | |
download | git-b3ce9a0874cc7ec1d0fd5ead97d78a428d1fdd75.tar.gz |
Merge branch 'jc/checkout-merge-base'
* jc/checkout-merge-base:
Fix "checkout A..." synonym for "checkout A...HEAD" on Windows
-rw-r--r-- | builtin-checkout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c index d0b1a728cb..527781728e 100644 --- a/builtin-checkout.c +++ b/builtin-checkout.c @@ -758,8 +758,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) new.name = arg; if ((new.commit = lookup_commit_reference_gently(rev, 1))) { setup_branch_path(&new); - if (resolve_ref(new.path, rev, 1, NULL)) - new.commit = lookup_commit_reference(rev); + + if ((check_ref_format(new.path) == CHECK_REF_FORMAT_OK) && + resolve_ref(new.path, rev, 1, NULL)) + ; else new.path = NULL; parse_commit(new.commit); |