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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21457: 25.0.50; vc-test-git03-working-revision test fails


From: Andreas Schwab
Subject: bug#21457: 25.0.50; vc-test-git03-working-revision test fails
Date: Sat, 12 Sep 2015 11:42:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> The patches below make this work for me.  The first one should
> probably be applied regardless, as without it vc-git--rev-parse is not
> safe to call in some borderline cases.
>
> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
> index 8a0f554..af2b39f 100644
> --- a/lisp/vc/vc-git.el
> +++ b/lisp/vc/vc-git.el
> @@ -1137,7 +1137,9 @@ (defun vc-git--rev-parse (rev)
>    (with-temp-buffer
>      (and
>       (vc-git--out-ok "rev-parse" rev)
> -     (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))
> +     (buffer-substring-no-properties (point-min)
> +                                     (min (1- (point-max))
> +                                          (+ (point-min) 40))))))

Why does vc-git--out-ok return true when git rev-parse failed?

Andreas.

-- 
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."





reply via email to

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