git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: BUG: "git revert -m 0 <commit>" considered to be "git revert <commit>"
Date: Wed, 15 Mar 2017 00:08:35 +0100	[thread overview]
Message-ID: <CACBZZX7Um==4pWfUVcLM8Kbk-ry8HQAmDoUVGjVPmhY3ZXUNYg@mail.gmail.com> (raw)

Both of these emit the "is a merge but no -m option was given" when
<commit> is a merge.

I tried to track this down for a bit in the options parsing code but
couldn't see where it was happening, but at some point we're setting
opts->mainline to 0 both when it's not provided, and when it's
explicitly provided as 0.

Instead we should e.g. pass "no option" through as NULL to the
sequencer, and emit some better error about how -m isn't zero-indexed.

             reply	other threads:[~2017-03-14 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 23:08 Ævar Arnfjörð Bjarmason [this message]
2017-03-15 16:56 ` [PATCH] cherry-pick: detect bogus arguments to --mainline Jeff King
2017-03-15 19:15   ` Junio C Hamano

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='CACBZZX7Um==4pWfUVcLM8Kbk-ry8HQAmDoUVGjVPmhY3ZXUNYg@mail.gmail.com' \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /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).