GNU bug report logs - #23769
25.0.95; Mode Line breakage in vc-git

Previous Next

Package: emacs;

Reported by: phillip.lord <at> russet.org.uk (Phillip Lord)

Date: Tue, 14 Jun 2016 11:17:01 UTC

Severity: normal

Found in version 25.0.95

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Phillip Lord <phillip.lord <at> russet.org.uk>
Cc: Glenn Morris <rgm <at> gnu.org>, 23769 <at> debbugs.gnu.org
Subject: Re: bug#23769: 25.0.95; Mode Line breakage in vc-git
Date: Thu, 16 Jun 2016 02:25:43 +0300
On 06/16/2016 01:09 AM, Phillip Lord wrote:

> Try it on a pre-commit hook. CWD is set to the root, and GIT_DIR is set
> to .git. Other people have found this:
>
> http://longair.net/blog/2011/04/09/missing-git-hooks-documentation/

OK, so hooks set it themselves.

> AFAICT, it's not actually documented by git. Or it is but the
> documentation is incomprehensible (hey, it's git, it could happen!).

Yup.

> That situation does indeed happen. For example, I normally checkout
> emacs into worktrees where you get this when commiting on emacs-25
> branch which is a worktree off master.

Does git-worktree use GIT_DIR in some way?

> There is a simpler option. I am trying to solve the root cause of the
> problem but, as you say, that might be fraught. Since the problem only
> seems to cause an error with vc-git-mode-line-string, we could just
> discard the error from vc-git-working-revision in this case.

That sounds like a last-resort option.

> Failing that, now I know what the problem is, at least I have a
> workaround (unset GIT_DIR in the pre-commit hook).

We could also unset GIT_DIR locally inside vc-git--call. At least when 
it's set to a known value such as '.git'.




This bug report was last modified 8 years and 337 days ago.

Previous Next


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