From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: [PATCH 1/4] branch: '--edit-description' is incompatible with other options
Date: Mon, 1 Jan 2018 23:54:45 +0100 [thread overview]
Message-ID: <20180101225448.2561-2-szeder.dev@gmail.com> (raw)
In-Reply-To: <20180101225448.2561-1-szeder.dev@gmail.com>
'--edit-description' is incompatible with 'git branch's other options,
but the check for conflicting options doesn't look for this option.
As a result 'git branch' doesn't error out showing usage when
'--edit-description' is used in combination with other options, but
e.g. 'git branch --list --edit-description' lists all branches and
doesn't edit any branch descriptions, while 'git branch
--edit-description --list' edits the current branch's description but
doesn't list the branches.
Look for '--edit-description', too, when looking for conflicting
options.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
builtin/branch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 8dcc2ed05..32531aa44 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -662,7 +662,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
list = 1;
if (!!delete + !!rename + !!copy + !!new_upstream +
- list + unset_upstream > 1)
+ list + unset_upstream + edit_description > 1)
usage_with_options(builtin_branch_usage, options);
if (filter.abbrev == -1)
--
2.16.0.rc0.67.g3a46dbca7
next prev parent reply other threads:[~2018-01-01 22:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-01 22:54 [PATCH 0/4] branch: add '--show-description' option SZEDER Gábor
2018-01-01 22:54 ` SZEDER Gábor [this message]
2018-01-01 22:54 ` [PATCH 2/4] t3200: fix a misindented line SZEDER Gábor
2018-01-01 22:54 ` [PATCH 3/4] t3200: restore branch after "unborn --edit-description" test SZEDER Gábor
2018-01-01 22:54 ` [PATCH 4/4] branch: add '--show-description' option SZEDER Gábor
2018-01-02 5:17 ` Eric Sunshine
2018-01-02 10:39 ` SZEDER Gábor
2018-01-02 9:32 ` Johannes Sixt
2018-01-02 10:41 ` SZEDER Gábor
2018-01-02 19:25 ` SZEDER Gábor
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180101225448.2561-2-szeder.dev@gmail.com \
--to=szeder.dev@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).