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 #12 received at control <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Jonathan Ganc <jonganc <at> gmail.com>
Cc: 26066 <at> debbugs.gnu.org
Subject: Re: bug#26066: 26.0.50; vc-git-status gives wrong result
Date: Tue, 14 Mar 2017 09:45:36 -0400
retitle 26066 vc-git-status gives wrong result when called from outside repository
severity 26066 minor
found 26066 24.5
found 26066 25.2
quit

(list 
 (let ((default-directory "/"))
   (require 'vc-git)
   (vc-git-state "/home/npostavs/src/emacs/emacs-master/README"))
 (let ((default-directory "/home/npostavs/src/emacs/emacs-master/"))
   (require 'vc-git)
   (vc-git-state "README"))) ;=> (added up-to-date)

Jonathan Ganc <jonganc <at> gmail.com> writes:

> I get this same behavior on emacs 24.5, 25.1. I have some ideas about
> how to fix the problems but I want to make sure this isn't somehow the
> expected behavior.

I doubt this particular behaviour is expected, but it's probably
unexpected that you would call vc-git-status from outside the repo.  If
you can fix things to handle this case without harming the normal case,
that sounds fine to me.





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.