From: Junio C Hamano Date: Wed, 20 Sep 2006 23:38:05 GMT Subject: Re: [PATCH] add receive.denyNonFastforwards config variable Message-ID: <7vlkoeds82.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Schindelin 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?