git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
RLRussell King - ARM Linux <linux@arm.linux.org.uk>
Date
Sep 4, 2010, 00:03 UTC
Message-ID
<20100904000348.GA7498@n2100.arm.linux.org.uk>
In-Reply-To
<20100903193309.GC29821@pengutronix.de>
On Fri, Sep 03, 2010 at 09:33:09PM +0200, Uwe Kleine-König wrote:
Show 6 quoted lines
> > 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.

Previous: Andreas SchwabNext: Andreas Gruenbacher
Message 6 of 16 in “Re: [PATCH V3] arm & sh: factorised duplicated clkdev.c”
  1. Uwe Kleine-KönigSep 3, 2010
  2. [BUG?] rename patch accepted with --dry-run, rejected without (Re: [PATCH V3] arm & sh: factorised duplicated clkdev.c)Jonathan Nieder, Sep 3, 2010
  3. Russell King - ARM LinuxSep 3, 2010
  4. Uwe Kleine-KönigSep 3, 2010
  5. Andreas SchwabSep 3, 2010
  6. Russell King - ARM LinuxSep 4, 2010
  7. Andreas GruenbacherSep 4, 2010
  8. Russell King - ARM LinuxSep 4, 2010
  9. Andreas GruenbacherSep 4, 2010
  10. Russell King - ARM LinuxSep 4, 2010
  11. Andreas GruenbacherSep 4, 2010
  12. Matthieu MoySep 3, 2010
  13. Andreas GruenbacherSep 3, 2010
  14. Jonathan NiederSep 3, 2010
  15. Andreas GruenbacherSep 4, 2010
  16. Jean-Christophe PLAGNIOL-VILLARDSep 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.