Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 27, 2016, 15:37 UTC
- Message-ID
- <alpine.DEB.2.20.1604271732570.2896@virtualbox>
- In-Reply-To
- <xmqqinz3axvc.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Wed, 27 Apr 2016, Junio C Hamano wrote:
Show 11 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > I am not sure about this double negation "no_commit_impossible" (I only > > understood what you meant because I had read the commit message first, > > something I won't do when stumbling over this code later). > > > > 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.
;-)
Ciao, Dscho