GNU bug report logs -
#3807
23.1.50; vc-dir ignores .gitignore
Previous Next
Reported by: Helmut Eller <eller.helmut <at> gmail.com>
Date: Fri, 10 Jul 2009 09:45:04 UTC
Severity: minor
Tags: fixed
Merged with 8179,
8603,
18514,
42966
Found in versions 23.3.50, 24.0.50, 24.3, 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Helmut Eller <eller.helmut <at> gmail.com> writes:
> I use git to manage some files (.emacs, .bashrc etc.) in my home
> directory and hg for a project in a directory named ~/lisp/slime/.
> I have both, a ~/.git and a ~/lisp/slime/.hg directory
> and my ~/.gitignore contains a line with: lisp*
>
> However when I invoke C-x v d on ~/lisp/slime, a buffer
> pops up with the first (wrong) line: VC backend : Git
> and lists most of the files from the ~/lisp/slime directory
> as "unregistered". Obviously, I would prefer to use the hg backend
> for the ~/lisp/slime directory.
>
> On the other hand: if I open a file in ~/lisp/slime the modeline
> correctly displays hg and commands like C-x v l or C-x v = correctly
> use the hg backend.
What happens here is: vc-dir calls (vc-responsible-backend "~/lisp/slime"),
which calls (vc-git-responsible-p "~/lisp/slime")
and that returns t because all vc-git-responsible-p does is to see if
~/lisp/slime is dominated by a .git directory. And it is.
You can easily work around this by changing the order of git and hg in
vc-handled-backends in your .emacs, like this:
(setq vc-handled-backends '(RCS CVS SVN SCCS Bzr Hg Git Mtn Arch))
We could make `vc-git-responsible-p' (and all the other functions that
do the same) not return t in this case, but I doubt it's worth the added
extra complexity.
Stefan, what do you think?
This bug report was last modified 4 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.