Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:05

Remi LESPINET [off-list ref] writes:
quoted hunk
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help