Re: [PATCH] add receive.denyNonFastforwards config variable
- From
Junio C Hamano <junkio@cox.net>
- Date
- Sep 20, 2006, 23:38 UTC
- Message-ID
- <7vlkoeds82.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0609210107140.19042@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> No longer barfs on new refs, and tries all merge bases (even if I > cannot come up with any scenario where there is more than one merge > base in the case of a fast forward).
Hmm. If that is the case (and I think it is although I haven't come up with a proof), the test can be written like this:
if (bases && !bases->next &&
hashcmp(old_sha1, bases->item->object.sha1))
; /* happy */
else
return error("not a fast forward");perhaps?