GNU bug report logs - #26066
vc-git-status gives wrong result when called from outside repository

Previous Next

Package: emacs;

Reported by: Jonathan Ganc <jonganc <at> gmail.com>

Date: Sun, 12 Mar 2017 02:45:02 UTC

Severity: minor

Tags: patch

Found in versions 25.2, 26.0.50, 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #67 received at 26066 <at> debbugs.gnu.org (full text, mbox):

From: Thien-Thi Nguyen <ttn <at> gnu.org>
To: 26066 <at> debbugs.gnu.org
Cc: Jonathan Ganc <jonganc <at> gmail.com>
Subject: Re: bug#26066: 26.0.50; vc-git-status gives wrong result
Date: Mon, 10 Apr 2017 09:35:28 +0200
[Message part 1 (text/plain, inline)]
() Jonathan Ganc <jonganc <at> gmail.com>
() Mon, 10 Apr 2017 00:41:15 -0400

   +      (while (string-match "\\(..\\) [^\0]+\0" status next-match)
   +        (push (match-string 1 status) code-list)
   +        (setq next-match (match-end 0)))
   +      (setq code-list (nreverse code-list))

You can also use something like:

 (mapcar (lambda (s)
           (substring s 0 2))
         (split-string status "\0"))

to compute the value of ‘code-list’.  Might be quicker, too.

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)
   (pcase (context query)
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502

[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.