[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:41:20 +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:09 AM, Phillip Lord wrote:
>> 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?
Well, it uses the directory that GIT_DIR points to (so
master/.git/worktrees/emacs-25 contains COMMIT_MSG, HEAD, index and so
on).
Whether is uses GIT_DIR, who knows. I pressume that all git commands
obey GIT_DIR.
>> 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.
It's certainly true that it would nice to fix it elsewhere, but I am
unconvinced that setting the mode-line should ever result in an error as
a normal part of it's operation.
>> 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'.
Yep; I guess, we know exactly what vc-git--call does with git, and if it
never depends on GIT_DIR that should work. Although setting and
unsetting GIT_DIR seems a bit of a pain.
Personally, I prefer my first option of calling git consistently --
always with CWD equal to root, and always with file paths relative to
the root. This way, GIT_DIR should not matter.
I presume the vc.el facade allows this, but if so, as this is going onto
master now, there is time.
Phil
- bug#23769: 25.0.95; Mode Line breakage in vc-git, (continued)
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/14
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/14
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/15
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/15
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/15
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Noam Postavsky, 2016/06/15
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/15
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/15
- bug#23769: 25.0.95; Mode Line breakage in vc-git,
Phillip Lord <=
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Noam Postavsky, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Phillip Lord, 2016/06/16
- bug#23769: 25.0.95; Mode Line breakage in vc-git, Dmitry Gutov, 2016/06/16