bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23769: 25.0.95; Mode Line breakage in vc-git


From: Phillip Lord
Subject: bug#23769: 25.0.95; Mode Line breakage in vc-git
Date: Thu, 16 Jun 2016 08:11:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux)

Dmitry Gutov <dgutov@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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]