git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug: Revert with -m 0 says no -m was given

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2017, 21:38 UTC
Message-ID
<xmqqmvcbad1q.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACBZZX5e-p4gKSWxehhVnnSgApC9H2v_ud+1Drz-vu_OAZwCgg@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 19 quoted lines
> On Thu, Mar 23, 2017 at 7:15 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Ulrik Sverdrup <ulrik.sverdrup@gmail.com> writes:
>>
>>> Git produces a misleading error when you tell it `git revert -m 0`.
>>
>> Thanks.
>>
>> I think this is the same issue as the one with 'cherry-pick' that
>> was reported earlier.  We have a fix in the 'master' branch already;
>> please try it out.
>
> Specifically, in master:
>
> $ ./git revert afd6726309
> error: commit afd6726309f57f532b4b989a75c1392359c611cc is a merge but
> no -m option was given.
> fatal: revert failed
> $ ./git revert -m 0 afd6726309
> error: option `mainline' expects a number greater than zero
Yes, exactly.
Thanks.
Previous: Ævar Arnfjörð Bjarmason
Message 4 of 4 in “Bug: Revert with -m 0 says no -m was given”
  1. Ulrik SverdrupMar 23, 2017
  2. Junio C HamanoMar 23, 2017
  3. Ævar Arnfjörð BjarmasonMar 23, 2017
  4. Junio C HamanoMar 23, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.