Pádraig, 2013/9/5 Pádraig Brady <[email protected]>: > The attached patch is a bit mangled and needs the following > adjustment to apply cleanly: > > -@@ -1,2 +1,2 @@ > +@@ -1,5 +1,5 @@
that, and it's missing a space in line 9 as well. > So with patch < 2.6, the behavior is OK, as the ignored hunk > is diagnosed in messages and exit code. > > However with patch >= 2.6 the ignored hunk is not diagnosed! > This results with default options in silent failures. Patch doesn't recognize the hunk in this case, it treats everything after line 8 of tempname.diff as garbage. The parser either requires an explicit file name or a patch header (the --- and +++ lines in unified format) followed by a number of valid hunks; everything else is treated as "garbage". It's not so hard to make patch recognize such hunks again, but then it will more easily misinterpret other text as part of a patch -- it's not so clear that things would improve. How did you end up with the broken patch? Editing by hand, right? Thanks, Andreas
