From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: vc-git bug with top-level repositories Date: Tue, 19 Aug 2008 16:43:22 -0400 Message-ID: References: <200808181433.m7IEX8U3028640@sallyv1.ics.uci.edu> <200808181639.m7IGd1kb005968@sallyv1.ics.uci.edu> <200808182031.m7IKVbR7001754@sallyv1.ics.uci.edu> <87bpzpxlir.fsf@gmail.com> <200808191656.m7JGuC4t025044@sallyv1.ics.uci.edu> Reply-To: ams@gnu.org NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1219178701 21377 80.91.229.12 (19 Aug 2008 20:45:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2008 20:45:01 +0000 (UTC) Cc: claus.klingberg@gmail.com, paul.r.ml@gmail.com, emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 19 22:45:53 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVY5Q-0001Qa-ME for ged-emacs-devel@m.gmane.org; Tue, 19 Aug 2008 22:45:53 +0200 Original-Received: from localhost ([127.0.0.1]:33809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVY4P-0005wy-Ns for ged-emacs-devel@m.gmane.org; Tue, 19 Aug 2008 16:44:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVY4L-0005tg-W4 for emacs-devel@gnu.org; Tue, 19 Aug 2008 16:44:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVY4K-0005s2-9r for emacs-devel@gnu.org; Tue, 19 Aug 2008 16:44:45 -0400 Original-Received: from [199.232.76.173] (port=39225 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVY4K-0005rz-4N for emacs-devel@gnu.org; Tue, 19 Aug 2008 16:44:44 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:45270) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KVY4J-0008VV-Bi for emacs-devel@gnu.org; Tue, 19 Aug 2008 16:44:43 -0400 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KVY30-0002e6-T7; Tue, 19 Aug 2008 16:43:22 -0400 In-reply-to: <200808191656.m7JGuC4t025044@sallyv1.ics.uci.edu> (message from Dan Nicolaescu on Tue, 19 Aug 2008 09:56:12 -0700) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102684 Archived-At: > As an other optimisation, can't we let the VCS itself decide > whether a file is under control or not ? I don't use git, but I > guess there is some way to check it. In mercurial for example, > 'hg root' returns the root of the working directory if it > exists, fails otherwise. Sorry if it has already been > discussed. It intentionally not done that way because, it would be too slow. The function in question is run every time a file is opened, and the VC systems are tried in the order they appear in `vc-handled-backends' until one matches... I am not sure I buy this. You already have to check if a file is registered or not by executing git. Doing `git rev-parse --git-dir' or `git rev-parse --is-inside-git-dir' isn't that much more of a headache. And I'd rather have aslow, and correct behaviour than wrong and fast.