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

Re: Why does "merge --continue" expect no arguments?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 25, 2021, 02:01 UTC
Message-ID
<xmqqk0ft5toy.fsf@gitster.g>
In-Reply-To
<211224.86mtkqgc8e.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 20 quoted lines
> On Tue, Dec 21 2021, Junio C Hamano wrote:
>
>> Or we could throw in another
>>
>>  * document more clearly that "merge --continue" is a mere synonym
>>    for, and hint that there is no reason to favor it over, "git
>>    commit".
>
> But it's not:
>
>     $ git add foo
>     $ git commit -v
>     hint: Waiting for your editor to close the file.[...]
>     ^C
>     $ git merge --continue
>     fatal: There is no merge in progress (MERGE_HEAD missing).
>
> FWIW I prefer and use it for that reason, i.e. it's useful for scripting
> to use these "stateful" commands when we're in some sort of rebase/merge
> "sequence" since it's an extra layer of sanity checking.

There is no additional safety afforded by that, though. There is no reason why one would even try to say "merge --continue" without doing any merge to begin with.

The "merge --continue" not taking any pathspec is a bit of safety, but even there, "commit" already has its own safety to reject pathspec when it notices that it is concluding a conflicted "merge", so "merge --continue" is not necessary for additional safety there, either.

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 8 of 12 in “Why does "merge --continue" expect no arguments?”
  1. Daniel VicarelDec 21, 2021
  2. Junio C HamanoDec 21, 2021
  3. Daniel VicarelDec 21, 2021
  4. Daniel VicarelDec 21, 2021
  5. Junio C HamanoDec 22, 2021
  6. Philip OakleyDec 21, 2021
  7. Ævar Arnfjörð BjarmasonDec 24, 2021
  8. Junio C HamanoDec 25, 2021
  9. Ævar Arnfjörð BjarmasonDec 26, 2021
  10. Junio C HamanoDec 27, 2021
  11. Daniel VicarelDec 23, 2021
  12. Junio C HamanoDec 23, 2021

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.