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

From: Jonathan Ganc <jonganc <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>, npostavs <at> users.sourceforge.net,
 26066 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#26066: 26.0.50; vc-git-status gives wrong result
Date: Mon, 1 May 2017 15:22:39 -0400

On 04/30/2017 09:57 PM, Dmitry Gutov wrote:
>
> I'm sorry about the delay as well.
>
No worries.
>
>> If this bug is unchanged, people using vc-state have to ask 
>> themselves: "if the backend is git, I have to bind default-directory 
>> but if it's not, I don't." That is inconsistent with vc agnosticism.
>
> However, not all other backends bind default-directory. Bzr doesn't, 
> as one example. Hg and SVN seem to do that, though. If you have a 
> chance to experiment with some other popular ones, please do.
>
But it's not clear to me that bzr needs to bind it. In other words, git 
needs to bind it get a working answer and perhaps bzr doesn't. 
Unfortunately, I only know git. If I get a chance I'll look at some 
others but I've never used them.

Community message: If anyone else who uses other VC systems is reading 
this, it'd great to know if vc-state gives the correct answer if 
default-directory is bound to a random directory!

> But what about the problems like "I don't have to bind 
> default-directory when calling vc-state, but I still have to do that 
> when calling other backend commands"?
>
This is just about clarification: are you thinking that one possible 
solution is not to have any of the vc code bind default-directory, i.e. 
that the caller might always be responsible for that?





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.