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


View this message in rfc822 format

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 23769 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> users.sourceforge.net>
Subject: bug#23769: 25.0.95; Mode Line breakage in vc-git
Date: Thu, 16 Jun 2016 08:11:50 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 06/16/2016 01:27 AM, Noam Postavsky wrote:
>
>> Apparently this "_the_ right way to write hooks that touch the files
>> in the work tree."
>>
>> http://permalink.gmane.org/gmane.comp.version-control.git/136276
>
> Is it the same behavior we're talking about?
>
> The thread says that GIT_DIR is set to '.', not to '.git'. I doubt the former
> setting would mesh well with binding default-directory to repository's root
> like the patch proposes.

According to this:

http://longair.net/blog/2011/04/09/missing-git-hooks-documentation/

that's for the post-recieve hook. In this case CWD is the git directory.
The logic of this is (I guess) that it works also in a bare repo.
pre-commit can only ever run in a non-bare repo since you cannot commit
if you don't have a worktree.

I suspect emacs will not be affected by this because if anyone did
run emacs in post-recieve they would only touch files *inside* the git
repo which Emacs would identify as not version-controlled.

But, again, it illustrates the point that GIT_DIR can (and is often) set
to a relative directory.

Phil





This bug report was last modified 9 years and 7 days ago.

Previous Next


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