Thread (57 messages) 57 messages, 9 authors, 2016-06-15

[BUG?] rename patch accepted with --dry-run, rejected without (Re: [PATCH V3] arm & sh: factorised duplicated clkdev.c)

From: Russell King - ARM Linux <hidden>
Date: 2016-06-15 22:49:28
Also in: git, linux-sh

On Fri, Sep 03, 2010 at 09:33:09PM +0200, Uwe Kleine-K?nig wrote:
quoted
git patches include additional metadata for renaming files, which gnu patch
will not understand.

If you want GNU patch compatible diffs, don't use -C or -M when generating
patches out of git.
Still GNU patch should then already fail in --dry-run mode.
And now look at the patch - it touches arch/sh/include/asm/clkdev.h twice.
Once to remove it and once as a rename.

GNU patch not in --dry-run mode will first remove arch/sh/include/asm/clkdev.h,
and then not have a file to deal with when it tries to patch the rename
part.  Whereas with --dry-run, the file stays around.

As I say, it's because GNU patch doesn't (currently) understand GIT
patches.  I wouldn't call that a bug in GNU patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help