diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-01 14:43:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-01 14:43:18 -0700 |
commit | 055f2c5d340508d3542ede8dc1db2aedd0b9f1b5 (patch) | |
tree | 7d33f7fc50749cb7acd5a3f25d281ffdf760e88b /builtin | |
parent | e08afecd7fe04b519b72f136c4a24b151c748f49 (diff) | |
parent | c17b229454ac3f5d20fd0cff3a663b03c13cb38e (diff) | |
download | git-055f2c5d340508d3542ede8dc1db2aedd0b9f1b5.tar.gz |
Merge branch 'jc/maint-1.7.3-checkout-describe' into maint
* jc/maint-1.7.3-checkout-describe:
checkout -b <name>: correctly detect existing branch
Diffstat (limited to 'builtin')
-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 28cdc51b85..af1e7b579a 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1071,7 +1071,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) if (strbuf_check_branch_ref(&buf, opts.new_branch)) die(_("git checkout: we do not like '%s' as a branch name."), opts.new_branch); - if (!get_sha1(buf.buf, rev)) { + if (ref_exists(buf.buf)) { opts.branch_exists = 1; if (!opts.new_branch_force) die(_("git checkout: branch %s already exists"), |