GNU bug report logs - #26028
26.0.50; epatch for multifile patches

Previous Next

Package: emacs;

Reported by: Arseny Sher <sher-ars <at> yandex.ru>

Date: Wed, 8 Mar 2017 17:34:01 UTC

Severity: minor

Tags: patch

Found in version 26.0.50

Full log


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

From: Arseny Sher <sher-ars <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 26028 <at> debbugs.gnu.org
Subject: Re: bug#26028: 26.0.50; epatch for multifile patches
Date: Thu, 09 Mar 2017 00:53:41 +0300
Eli Zaretskii <eliz <at> gnu.org> writes:

> I think you should point it to ~/tmp, not ~/tmp/old.  IOW, the
> directory should be the one relative to which the file names in the
> patch file will correctly point to the files.

Okay, it might be not very convenient (as you might have several
versions of project inside ~/tmp, and ediff will ask you which one is to
be patched), but it works. However, how then I am expected to apply
patches generated by VCS, where paths are prefixed with a/ and b/?
Again, let's consider some simple example:

mkdir -p proj/src
cd proj
echo "void main() {}" > src/hello.c
git init
git add src/ && git commit -m "commit"
echo "int main() { return 0; }" > src/hello.c
git diff > ../tmp.patch
git reset --hard HEAD

cat ../tmp.patch
diff --git a/src/hello.c b/src/hello.c
index ab73b3a..76e8197 100644
--- a/src/hello.c
+++ b/src/hello.c
@@ -1 +1 @@
-void main() {}
+int main() { return 0; }

How should I apply tmp.patch to proj?

Yet am not still sure that this is not a bug; some other guy said that
this behaviour doesn't make sense, and similar bug was fixed recently:
http://lists.gnu.org/archive/html/help-gnu-emacs/2017-03/msg00064.html
http://emacs.1067599.n8.nabble.com/bug-25010-26-0-50-epatch-might-parse-wrongly-a-file-name-td413747.html

And while I am here, I would like to express my gratitude to ediff
developers; it is in overall a great tool, and it is a pleasure to read
its manual. Thank you guys!




This bug report was last modified 3 years and 83 days ago.

Previous Next


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