emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-git bug with top-level repositories


From: Alfred M. Szmidt
Subject: Re: vc-git bug with top-level repositories
Date: Tue, 19 Aug 2008 16:43:22 -0400

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]