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 | connect: correctly number ipv6 network adapter (diff) | |
| parent | checkout -b <name>: correctly detect existing branch (diff) | |
| download | git-055f2c5d340508d3542ede8dc1db2aedd0b9f1b5.tar.gz git-055f2c5d340508d3542ede8dc1db2aedd0b9f1b5.zip | |
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"), |
