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

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2016, 16:02 UTC
Message-ID
<xmqq37q7avlf.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.20.1604271732570.2896@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 16 quoted lines
>> > Maybe something like `disallow_no_commit`?
>> 
>> That would be the best name once we start dying in there.  It might
>> be still better, even while we merely warn but let it pass, than the
>> double negative.  Or it may not.  I dunno.
>
> Actually, I should admit that I was really puzzled by the name at first. I
> thought that some commits were impossible, but the function said that no
> commit was impossible. So I thought: but what if a commit references
> itself as parent, would that not be impossible? But actually, once SHA-1
> collision attacks become feasible, I guess it would not be impossible.
> Making for an excellent attack vector, say, on repository hosting sites
> (which would now be stuck in infinite loops due to a violation of the
> temporal prime directive).
>
> So yeah, this was my thought process when I read no_commit_impossible.

We both know that the original name was terrible now. It was meant to mean "it is impossible to honor --no-commit option", nothing more, and left the door open for deciding what should happen when that condition holds (either "warn but succeed the merge anyway" or "die to refuse"), but it is clear that the name did not convey that successfully.

Previous: Johannes Schindelin
Message 21 of 21 in “git merge branch --no-commit does commit fast forward merges”
  1. Christoph PaulikApr 17, 2016
  2. Jacob KellerApr 17, 2016
  3. Johannes SchindelinApr 18, 2016
  4. Andrew ArdillApr 18, 2016
  5. Christoph PaulikApr 18, 2016
  6. Andrew ArdillApr 18, 2016
  7. Junio C HamanoApr 18, 2016
  8. Junio C HamanoApr 18, 2016
  9. 1/2 merge: do not contaminate option_commit with --squashJunio C Hamano, Apr 26, 2016
  10. Johannes SchindelinApr 27, 2016
  11. Junio C HamanoApr 27, 2016
  12. Johannes SchindelinApr 27, 2016
  13. 2/2 merge: warn --no-commit merge when no new commit is createdJunio C Hamano, Apr 26, 2016
  14. Stefan BellerApr 26, 2016
  15. Junio C HamanoApr 26, 2016
  16. Eric SunshineApr 27, 2016
  17. Johannes SixtApr 27, 2016
  18. Johannes SchindelinApr 27, 2016
  19. Junio C HamanoApr 27, 2016
  20. Johannes SchindelinApr 27, 2016
  21. Junio C HamanoApr 27, 2016

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.