From: James Y Knight Date: Mon, 4 Apr 2011 19:09:08 +0000 (-0400) Subject: git-svn: Cache results of running the executable "git config" X-Git-Tag: v1.7.5-rc2~8^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f5549afd5d6c5492176b6fa21769c59bfe8e1d70;p=git.git git-svn: Cache results of running the executable "git config" Running programs is not cheap! Signed-off-by: James Y Knight Signed-off-by: Alejandro R. SedeƱo Acked-by: Eric Wong --- diff --git a/git-svn.perl b/git-svn.perl index e5a553f00..bf0451b46 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -59,6 +59,7 @@ use File::Find; use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/; use IPC::Open3; use Git; +use Memoize; # core since 5.8.0, Jul 2002 BEGIN { # import functions from Git into our packages, en masse @@ -72,6 +73,8 @@ BEGIN { *{"${package}::$_"} = \&{"Git::$_"}; } } + Memoize::memoize 'Git::config'; + Memoize::memoize 'Git::config_bool'; } my ($SVN); @@ -3210,6 +3213,8 @@ sub has_no_changes { Memoize::unmemoize 'check_cherry_pick'; Memoize::unmemoize 'has_no_changes'; } + + Memoize::memoize 'Git::SVN::repos_root'; } END {