Re: [PATCH 2/2] Cached the git configuration, which is now noticibly faster on windows.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: John Chapman <thestar@...>
Cc: <git@...>
Date: Saturday, November 8, 2008 - 1:19 am

On Fri, Nov 7, 2008 at 7:22 PM, John Chapman <thestar@fussycoder.id.au> wrote:


If this is truly a noticeable bottleneck on Windows, something like
the following might be even better:  (completely untested!)

_gitConfig = None
def gitConfig(key):
  if _gitConfig is None:
    lines = read_pipe("git config -l", ignore_error=True).readlines():
    _gitConfig = dict([l.strip().split('=', 1) for l in lines])
  return _gitConfig.get(key, None)



Dave.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/2] Cached the git configuration, which is now n..., David Symonds, (Sat Nov 8, 1:19 am)