GNU bug report logs -
#68183
28.3; vc-dir fails when I have a certain branch checked out
Previous Next
Reported by: Tom Tromey <tom <at> tromey.com>
Date: Sun, 31 Dec 2023 19:00:02 UTC
Severity: normal
Found in version 28.3
Done: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 68183 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
> Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
>
>> Tom Tromey <tom <at> tromey.com> writes:
>>
>>> Eli> Thanks, but I think we'd appreciate a reproducible recipe for this:
>>> Eli> how can one create a Git repository which can be used to reproduce
>>> Eli> this issue?
>>>
>>> This worked for me:
>>>
>>> $ cd ~/Emacs/trunk
>>> # This is my Emacs git repository
>>> $ git checkout --track -b vc-dir-bug master
>>> branch 'vc-dir-bug' set up to track 'master'.
>>> Switched to a new branch 'vc-dir-bug'
>>>
>>>
>>> Now invoke vc-dir on that directory.
>>
[…]
> Here's a patch. […]
And here's another revision, addressing most of the points below.
WDY'allT?
> * the test should probably have a (skip-unless (have-git-or-something)),
Done.
> * maybe "none (tracking local branch)" is not informative and we should
> ditch it,
> * maybe we should fall back to "origin", like vc-git-repository-url
> does,
FWIW, the current patch will show
Branch : vc-dir-tracking-branch
Tracking : origin/master
Remote : https://git.savannah.gnu.org/git/emacs.git
for my checkout of this work-in-progress patch, and
Branch : vc-dir-bug
Tracking : master
Remote : none (tracking local branch)
for a checkout made following Tom's recipe, and
Branch : trunk
for a fresh 'git init' with just a default branch.
OT1H "none (tracking local branch)" is redundant with "Tracking" not
being prefixed with "origin"; OTOH
* stripping "Remote" altogether might confuse users - at least "tracking
local branch" hints at what's going on,
* Falling back to origin's URL might also cause confusion: users might
then expect 'vc-pull' to fetch changes from that URL, which is not the
case.
So all in all I think the above is reasonably useful.
> * rushed the ChangeLog entry; vc-git-test--run should also be declared
> as a "new helper" (and maybe I should spell out that I used it to not
> have to depend on vc-git-- internal functions),
Done.
> * maybe the new header deserves a NEWS entry.
Maybe?
[0001-Fix-vc-dir-when-remote-Git-branch-is-local.patch (text/x-diff, attachment)]
This bug report was last modified 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.