Kévin Le Gouguec writes: > Kévin Le Gouguec writes: > >> Tom Tromey 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?