Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Documentation/diff-options.txt: unify options

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:50

Thanks.

jidanni@jidanni.org writes:
(You were right about my previous patch being bad.
At least git-am gives an error message when fed
http://article.gmane.org/gmane.comp.version-control.git/104017/raw
git-apply however does nothing and returns 0! Must be a bug.)
OK, here's a better patch:

Signed-off-by: jidanni <redacted>
---
That commentary above your S-o-b is not a proper commit log message, but
I'll come up with something and apply.

$ wget http://article.gmane.org/gmane.comp.version-control.git/104017/raw
$ git apply raw
error: diff-options.txt: No such file or directory
$ echo $?
1

Even if you hand munge the "raw" file to have proper prefix, it will
refuse to apply a context-free diff.

$ git apply raw-edited
error: patch failed: Documentation/diff-options.txt:26
error: Documentation/diff-options.txt: patch does not apply
$ echo $?
1     

This is to avoid applying the patch only by line number without context;
see the last paragraph of [ref] for
the explanation.

Upon a very rare case where you are absolutely sure that your copy is what the
patch is based on and that it is safe to applying a context-free patch
only by line number, you can give --unidiff-zero option to git-apply to
countermand this safety measure, but a patch posted on the public mailing
list for open source development rarely falls into that category.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help