Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jc/checkout-merge-base'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 21 Jan 2010 04:28:51 +0000
(20:28 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 21 Jan 2010 04:28:51 +0000
(20:28 -0800)
* jc/checkout-merge-base:
Fix "checkout A..." synonym for "checkout A...HEAD" on Windows
builtin-checkout.c
patch
|
blob
|
history
raw
(from parent 1:
4190564
)
diff --git
a/builtin-checkout.c
b/builtin-checkout.c
index d0b1a728cb81e041c685b37014688f0684779132..527781728e0706b906a94ddfb8ee2e8bb06fa05e 100644
(file)
--- 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);