GNU bug report logs - #3807
23.1.50; vc-dir ignores .gitignore

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Helmut Eller <eller.helmut@HIDDEN>; merged with #8179, #8603, #18514; dated Fri, 10 Jul 2009 09:45:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 3807 8179 8603 18514. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 3807 8179 8603. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 3807 8179. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 3807@HIDDEN:


Received: (at 3807) by emacsbugs.donarmstrong.com; 15 Jul 2009 19:06:29 +0000
From monnier@HIDDEN Wed Jul 15 12:06:28 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	SUBJECT_FUZZY_TION autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6FJ6OV6015301
	for <3807@HIDDEN>; Wed, 15 Jul 2009 12:06:25 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvYEADvFXUrO+KNz/2dsb2JhbACBUdIChAkFhm6CTA
X-IronPort-AV: E=Sophos;i="4.42,406,1243828800"; 
   d="scan'208";a="41673309"
Received: from 206-248-163-115.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.115])
  by ironport2-out.teksavvy.com with ESMTP; 15 Jul 2009 15:06:17 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id EFC5A7EF7; Wed, 15 Jul 2009 15:06:39 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Dan Nicolaescu <dann@HIDDEN>
Cc: Helmut Eller <eller.helmut@HIDDEN>, 3807 <at> debbugs.gnu.org
Subject: Re: bug#3807: 23.1.50; vc-dir ignores .gitignore
Message-ID: <jwvzlb54vjx.fsf-monnier+emacsbugreports@HIDDEN>
References: <m2ab3cevxn.fsf@HIDDEN>
	<200907101929.n6AJTt7v025635@HIDDEN>
Date: Wed, 15 Jul 2009 15:06:39 -0400
In-Reply-To: <200907101929.n6AJTt7v025635@HIDDEN> (Dan
	Nicolaescu's message of "Fri, 10 Jul 2009 12:29:55 -0700 (PDT)")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> 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?

I think that rather than having an external loop for all backends which
inside walks up the diretory hierarchy, we need an external loop which
walks up the directory hierarchy and inside loops over all backends.


        Stefan



Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3807; Package emacs. Full text available.

Message received at 3807@HIDDEN:


Received: (at 3807) by emacsbugs.donarmstrong.com; 14 Jul 2009 21:14:07 +0000
From eller.helmut@HIDDEN Tue Jul 14 14:14:07 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-1.3 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	SUBJECT_FUZZY_TION autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from ix (dial-184207.pool.broadband44.net [212.46.184.207])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6ELE2xg013949
	for <3807@HIDDEN>; Tue, 14 Jul 2009 14:14:04 -0700
Received: from helmut by ix with local (Exim 4.69)
	(envelope-from <eller.helmut@HIDDEN>)
	id 1MQpJz-0000sU-AX; Tue, 14 Jul 2009 23:13:55 +0200
From: Helmut Eller <eller.helmut@HIDDEN>
To: Dan Nicolaescu <dann@HIDDEN>
Cc: 3807 <at> debbugs.gnu.org
Subject: Re: bug#3807: 23.1.50; vc-dir ignores .gitignore
References: <m2ab3cevxn.fsf@HIDDEN>
	<200907141854.n6EIsHmS009115@HIDDEN>
Date: Tue, 14 Jul 2009 23:13:55 +0200
In-Reply-To: <200907141854.n6EIsHmS009115@HIDDEN> (Dan
	Nicolaescu's message of "Tue, 14 Jul 2009 11:54:17 -0700 (PDT)")
Message-ID: <m263dvt1bg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

* Dan Nicolaescu [2009-07-14 20:54+0200] writes:

>   > 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.
>
> There's a generic workaround for problems like this: use
> C-u C-x v d 
> to start vc-dir, it will prompt for the VC backend to use.

It's kinda inconsistent that vc-find-file-hook and vc-dir choose
different backends, but fair enough, I can live with the prefix arg.

Helmut.



Acknowledgement sent to Helmut Eller <eller.helmut@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3807; Package emacs. Full text available.

Message received at 3807@HIDDEN:


Received: (at 3807) by emacsbugs.donarmstrong.com; 14 Jul 2009 18:54:37 +0000
From dann@HIDDEN Tue Jul 14 11:54:37 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,GMAIL,HAS_BUG_NUMBER,
	SUBJECT_FUZZY_TION,X_DEBBUGS_NO_ACK autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6EIsVeA020117
	for <3807@HIDDEN>; Tue, 14 Jul 2009 11:54:32 -0700
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6EIsIeb028682;
	Tue, 14 Jul 2009 11:54:18 -0700 (PDT)
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6EIsHmS009115;
	Tue, 14 Jul 2009 11:54:17 -0700 (PDT)
Date: Tue, 14 Jul 2009 11:54:17 -0700 (PDT)
Message-Id: <200907141854.n6EIsHmS009115@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 3807 <at> debbugs.gnu.org
Subject: Re: bug#3807: 23.1.50; vc-dir ignores .gitignore
References: <m2ab3cevxn.fsf@HIDDEN>
X-Debbugs-No-Ack: yes
In-Reply-To: <m2ab3cevxn.fsf@HIDDEN> (Helmut Eller's message of "Fri, 10
	Jul 2009 11:20:20 +0200")
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please contact the ISP for more information
X-ICS-MailScanner-ID: n6EIsIeb028682
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.03, required 5,
	autolearn=disabled, ALL_TRUSTED -1.44, SUBJECT_FUZZY_TION 0.41)
X-ICS-MailScanner-From: dann@HIDDEN

Helmut Eller <eller.helmut@HIDDEN> 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.

There's a generic workaround for problems like this: use
C-u C-x v d 
to start vc-dir, it will prompt for the VC backend to use.



Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3807; Package emacs. Full text available.

Message received at 3807@HIDDEN:


Received: (at 3807) by emacsbugs.donarmstrong.com; 10 Jul 2009 19:30:13 +0000
From dann@HIDDEN Fri Jul 10 12:30:13 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-6.4 required=4.0 tests=AWL,FOURLA,GMAIL,
	HAS_BUG_NUMBER,SUBJECT_FUZZY_TION,X_DEBBUGS_NO_ACK autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6AJU9NY012172
	for <3807@HIDDEN>; Fri, 10 Jul 2009 12:30:10 -0700
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6AJTu7u022804;
	Fri, 10 Jul 2009 12:29:56 -0700 (PDT)
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6AJTt7v025635;
	Fri, 10 Jul 2009 12:29:55 -0700 (PDT)
Date: Fri, 10 Jul 2009 12:29:55 -0700 (PDT)
Message-Id: <200907101929.n6AJTt7v025635@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 3807 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#3807: 23.1.50; vc-dir ignores .gitignore
References: <m2ab3cevxn.fsf@HIDDEN>
X-Debbugs-No-Ack: yes
In-Reply-To: <m2ab3cevxn.fsf@HIDDEN> (Helmut Eller's message of "Fri, 10
	Jul 2009 11:20:20 +0200")
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please contact the ISP for more information
X-ICS-MailScanner-ID: n6AJTu7u022804
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.03, required 5,
	autolearn=disabled, ALL_TRUSTED -1.44, SUBJECT_FUZZY_TION 0.41)
X-ICS-MailScanner-From: dann@HIDDEN

Helmut Eller <eller.helmut@HIDDEN> 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?



Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3807; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 10 Jul 2009 09:40:48 +0000
From eller.helmut@HIDDEN Fri Jul 10 02:40:47 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.2 required=4.0 tests=SUBJECT_FUZZY_TION
	autolearn=no version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6A9efdA006952
	for <submit@HIDDEN>; Fri, 10 Jul 2009 02:40:42 -0700
Received: from mx10.gnu.org ([199.232.76.166]:36327)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eller.helmut@HIDDEN>)
	id 1MPCau-0000dq-5a
	for emacs-pretest-bug@HIDDEN; Fri, 10 Jul 2009 05:40:40 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eller.helmut@HIDDEN>)
	id 1MPCas-0002zV-MF
	for emacs-pretest-bug@HIDDEN; Fri, 10 Jul 2009 05:40:39 -0400
Received: from mx20.gnu.org ([199.232.41.8]:11467)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <eller.helmut@HIDDEN>)
	id 1MPCas-0002yF-2E
	for emacs-pretest-bug@HIDDEN; Fri, 10 Jul 2009 05:40:38 -0400
Received: from dial-184207.pool.broadband44.net ([212.46.184.207] helo=ix)
	by mx20.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eller.helmut@HIDDEN>)
	id 1MPCaq-0000Qq-D6
	for emacs-pretest-bug@HIDDEN; Fri, 10 Jul 2009 05:40:36 -0400
Received: from helmut by ix with local (Exim 4.69)
	(envelope-from <eller.helmut@HIDDEN>)
	id 1MPCHE-00038B-CU
	for emacs-pretest-bug@HIDDEN; Fri, 10 Jul 2009 11:20:20 +0200
From: Helmut Eller <eller.helmut@HIDDEN>
To: emacs-pretest-bug@HIDDEN
Subject: 23.1.50; vc-dir ignores .gitignore
Date: Fri, 10 Jul 2009 11:20:20 +0200
Message-ID: <m2ab3cevxn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized.

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.

Helmut.


In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2009-07-10 on ix
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--with-xpm=no' '--with-gif=no' '--with-tiff=no' '--with-sound=no''



Acknowledgement sent to Helmut Eller <eller.helmut@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3807; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.