[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11109: 24.0.94; vc-git-state: Stack overflow in regexp matcher
From: |
Andreas Schwab |
Subject: |
bug#11109: 24.0.94; vc-git-state: Stack overflow in regexp matcher |
Date: |
Wed, 28 Mar 2012 10:36:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) |
Sven Joachim <svenjoac@gmx.de> writes:
> I'm getting frequent "Stack overflow in regexp matcher" errors when
> visiting files under git version control with uncommitted changes. This
> started to happen rather recently.
Does that help?
Andreas.
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index bf7b7fb..b71dc95 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -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:
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."