Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] _git: Also complete FETCH_HEAD, ORIG_HEAD and MERGE_HEAD.



On Mon, Mar 22, 2010 at 03:30, Benjamin R. Haskell <zsh@xxxxxxxxxx> wrote:
> Testing the existence of $gitdir/{refname} seems a fine compromise.
> (Really, I don't see the issue; this seems like a drop in the bucket of
> _git's performance issues... ÂI s'pose the forks are prohibitively
> expensive on Win32? ÂRevised patch below anyway.)

> (In case it's unclear, I prefer my previous patch -- doesn't _git fork
> all over the place? -- but either one's preferable to no-change or
> always-adding-them.)

Yes, it does, and, as you mention, itâs horribly slow to fork on
Windows.  I mean, what where they thinking?  But I question the value
of forking for this particular test.  Still, itâs more correct to use
rev-parse.  As your patch uses rev-parse to find gitdir once already,
weâre not gaining much by globbing instead.

I just ran a benchmark on Cygwin and it takes about 0.5 seconds to run
four rev-parses.

Perhaps completing them all without checking if theyâre valid
beforehand is the best solution?



Messages sorted by: Reverse Date, Date, Thread, Author