All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Qingyun <taoqy@ls-a.me>
To: gitster@pobox.com
Cc: git@vger.kernel.org, avarab@gmail.com, Tao Qingyun <taoqy@ls-a.me>
Subject: [PATCH] builtin/branch.c: remove useless branch_get
Date: Mon, 15 Oct 2018 22:08:39 +0800	[thread overview]
Message-ID: <20181015140839.4925-1-taoqy@ls-a.me> (raw)
In-Reply-To: <CACBZZX7i-Uob9EJ8GeDKYVTyKtdRiy=qPbxSOe=FGh2cbHG9Zw@mail.gmail.com>

Signed-off-by: Tao Qingyun <taoqy@ls-a.me>
---
 builtin/branch.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/builtin/branch.c b/builtin/branch.c
index c396c41533..2367703034 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -809,11 +809,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"));
 
-- 
2.19.0


  reply	other threads:[~2018-10-15 14:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-13  8:11 [Question] builtin/branch.c Tao Qingyun
2018-10-14 10:19 ` Ævar Arnfjörð Bjarmason
2018-10-15 14:08   ` Tao Qingyun [this message]
2018-10-15 17:17     ` [PATCH] builtin/branch.c: remove useless branch_get Jeff King
2018-10-16 14:54       ` [PATCH v2] " Tao Qingyun
2018-10-17  8:39         ` Jeff King
2018-10-17 12:58           ` Tao Qingyun
2018-10-15 17:14   ` [Question] builtin/branch.c Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181015140839.4925-1-taoqy@ls-a.me \
    --to=taoqy@ls-a.me \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.