[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff-hunk-header-re-unified does not match all hunks
From: |
Bernhard Herzog |
Subject: |
diff-hunk-header-re-unified does not match all hunks |
Date: |
Thu, 24 Apr 2008 11:52:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
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
- diff-hunk-header-re-unified does not match all hunks,
Bernhard Herzog <=