summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-11-21 22:58:06 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-21 22:58:06 +0900
commit2b40fdd0791404fe8ba35b5061c4aff341ac6fa6 (patch)
tree711d1e2983726e15c83bd6996c14ecc854fba216 /builtin
parentMerge branch 'sb/strbuf-h-update' into maint (diff)
parentbuiltin/branch.c: remove useless branch_get (diff)
downloadtgif-2b40fdd0791404fe8ba35b5061c4aff341ac6fa6.tar.xz
Merge branch 'tq/branch-create-wo-branch-get' into maint
Code clean-up. * tq/branch-create-wo-branch-get: builtin/branch.c: remove useless branch_get
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index bbd006aab4..daf054598b 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -828,11 +828,6 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
git_config_set_multivar(buf.buf, NULL, NULL, 1);
strbuf_release(&buf);
} else if (argc > 0 && argc <= 2) {
- struct branch *branch = branch_get(argv[0]);
-
- if (!branch)
- die(_("no such branch '%s'"), argv[0]);
-
if (filter.kind != FILTER_REFS_BRANCHES)
die(_("-a and -r options to 'git branch' do not make sense with a branch name"));