1
0
mirror of https://github.com/git/git.git synced 2024-09-28 18:32:37 +02:00

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>
This commit is contained in:
James Y Knight 2011-04-04 15:09:08 -04:00 committed by Eric Wong
parent 12a296bca3
commit f5549afd5d

@ -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 {