From: Junio C Hamano Date: Mon, 01 Jun 2015 17:16:21 GMT Subject: Re: [RFC] solving a bug with hunks starting at line 1 in git apply Message-ID: In-Reply-To: <87k2vnqrv8.fsf@ensimag.grenoble-inp.fr> Remi LESPINET writes: > first original file: > > 10 > 20 > 30 > 40 > > for the following diff file: > > @@ -1,2 +1,2 @@ > 20 > -30 > +35 > 40 > > The patch will not be applied with a git apply command, but it will > with a basic patch command. Doesn't that merely indicate a bug in "patch", though? The patch text says that the preimage must begin with "20" but the target begins with "10". I think we have the same "the boundary must match" logic not just at the beginning of the file but also at the end of the file. No matter what the answer to the above question is, we would need to do the same for both the beginning and the end, I would think. Thanks.