GNU bug report logs - #44379
File name affects patch patched file regardless of diff

Previous Next

Package: diffutils;

Reported by: Michael Partridge <mcp292 <at> nau.edu>

Date: Sun, 1 Nov 2020 22:36:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Partridge <mcp292 <at> nau.edu>
To: bug-diffutils <at> gnu.org
Subject: File name affects patch patched file regardless of diff
Date: Sun, 1 Nov 2020 15:34:42 -0700
[Message part 1 (text/plain, inline)]
Reproduce with:

diff -u driver.c.master driver.c > d.diff
patch < d.diff

driver.c is patched instead of the intended driver.c.master. If I change
the name to master_driver.c it works as intended.

The use case:
When I want to merge a couple lines of changes from another git branch, I
sometimes rename the file in the master branch by appending .master then
checkout the file that has some of the changes I want. From there I run the
diffs as seen above and manually edit the diff file to achieve the exact
edits I want before patching.


MCP
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.