]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixes: debbugs:11109
authorAndreas Schwab <schwab@linux-m68k.org>
Wed, 28 Mar 2012 10:12:02 +0000 (12:12 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Wed, 28 Mar 2012 10:12:02 +0000 (12:12 +0200)
* vc/vc-git.el (vc-git-state): Don't try to match all of the diff
contents.

lisp/ChangeLog
lisp/vc/vc-git.el

index 65018db7e4dc1053ed83ba14e4e265aa5792f19f..57c2edcbb28c5002b0ac94a305e5b98ad94db870 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-28  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * vc/vc-git.el (vc-git-state): Don't try to match all of the diff
+       contents.  (Bug#11109)
+
 2012-03-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/avl-tree.el (avl-tree--enter-balance): Fix paren typo
index bf7b7fb9e170fa83ad2087c48fcc6bf81f11d8a1..b71dc95dba2d0c5a91adeddfea8f6c19187e084a 100644 (file)
@@ -220,11 +220,10 @@ matching the resulting Git log output, and KEYWORDS is a list of
     (let ((diff (vc-git--run-command-string
                  file "diff-index" "-p" "--raw" "-z" "HEAD" "--")))
       (if (and diff
-              (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(\\(?:.\\|\n\\)*\\)\\'"
+              (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(.\\)?"
                             diff))
-          (let ((diff-letter (match-string 1 diff))
-                (diff-contents (match-string 2 diff)))
-            (if (not (string-match "\n." diff-contents))
+          (let ((diff-letter (match-string 1 diff)))
+            (if (not (match-beginning 2))
                 ;; Empty diff: file contents is the same as the HEAD
                 ;; revision, but timestamps are different (eg, file
                 ;; was "touch"ed).  Update timestamp in index: