summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorJames Y Knight <jknight@itasoftware.com>2011-04-04 19:09:08 (GMT)
committerEric Wong <normalperson@yhbt.net>2011-04-09 22:43:35 (GMT)
commitf5549afd5d6c5492176b6fa21769c59bfe8e1d70 (patch)
tree4e003cfc36411dc2b56832fe410c8294f96dbfd3 /git-svn.perl
parent12a296bca3d07875d4c3db0e8e24fbaa86ca97b3 (diff)
downloadgit-f5549afd5d6c5492176b6fa21769c59bfe8e1d70.zip
git-f5549afd5d6c5492176b6fa21769c59bfe8e1d70.tar.gz
git-f5549afd5d6c5492176b6fa21769c59bfe8e1d70.tar.bz2
git-svn: Cache results of running the executable "git config"
Running programs is not cheap! Signed-off-by: James Y Knight <jknight@itasoftware.com> Signed-off-by: Alejandro R. SedeƱo <asedeno@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index e5a553f..bf0451b 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 {