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: Miles Bader
Subject: Re: vc-git bug with top-level repositories
Date: Wed, 20 Aug 2008 11:22:01 +0900

>> Doing `git rev-parse --git-dir' or `git rev-parse --is-inside-git-dir'
>> isn't that much more of a headache.
>
> That would then have to be run for _every_ file that Emacs is opening.
> The check whether a directory is controlled by a VCS should be as fast
> as possible.

... and it would have to be done for every vcs supported by Emacs...

As Dan says, there's a reason Emacs does it the way it does.

Running (or at least trying to run) 5-6 external programs, for every
file visited, is not a very nice idea, even if the programs are pretty
fast... :-)

I suppose it is true that if Emacs were to use the "run external
programs to check" method, there are probably various optimizations that
could be done -- e.g. only do it once for the first file visited in any
given directory and assume the resulting status holds for subsequent
files in the same directory.  However I think such optimizations also
require making various assumptions (in this case, for instance, that the
state won't change), and have their own tradeoffs.

-Miles

-- 
Discriminate, v.i. To note the particulars in which one person or thing is,
if possible, more objectionable than another.




reply via email to

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