all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* diff-hunk-header-re-unified does not match all hunks
@ 2008-04-24  9:52 Bernhard Herzog
  2008-04-25  2:15 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Herzog @ 2008-04-24  9:52 UTC (permalink / raw)
  To: emacs-devel


diff-mode.el in CVS HEAD has an incorrect value for
diff-hunk-header-re-unified:

(defconst diff-hunk-header-re-unified
  "^@@ -\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)? \\+\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\) @@")

There should be a '?' after the last group:

"^@@ -\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)? \\+\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)? @@"

As is, diff mode cannot deal properly with diffs like this:

diff -ruN origdir/newfile newdir/newfile
--- origdir/newfile	1970-01-01 01:00:00.000000000 +0100
+++ newdir/newfile	2008-04-24 10:47:53.661124659 +0200
@@ -0,0 +1 @@
+new file with a single line
diff -ruN origdir/some-file newdir/some-file
--- origdir/some-file	2008-04-24 10:54:52.930269418 +0200
+++ newdir/some-file	2008-04-24 10:55:12.147053567 +0200
@@ -1 +1 @@
-`Twas brillig, and the slithy toves
+did gyre and gimble in the wabe:


Navigating with diff-file-prev or diff-file-next does not find these
hunks.

   Bernhard

-- 
Bernhard Herzog                              Intevation GmbH, Osnabrück
Amtsgericht Osnabrück, HR B 18998             http://www.intevation.de/
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-25  2:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24  9:52 diff-hunk-header-re-unified does not match all hunks Bernhard Herzog
2008-04-25  2:15 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.