bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Sven Joachim
Subject: bug#11109: 24.0.94; vc-git-state: Stack overflow in regexp matcher
Date: Wed, 28 Mar 2012 10:49:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

On 2012-03-28 10:36 +0200, Andreas Schwab wrote:

> Sven Joachim <address@hidden> 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?

Yes, that seems to work.  Thanks.

> 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:

Cheers,
       Sven





reply via email to

[Prev in Thread] Current Thread [Next in Thread]