Skip to content

Commit f5549af

Browse files
James Y KnightEric Wong
authored andcommitted
git-svn: Cache results of running the executable "git config"
Running programs is not cheap! Signed-off-by: James Y Knight <[email protected]> Signed-off-by: Alejandro R. Sedeño <[email protected]> Acked-by: Eric Wong <[email protected]>
1 parent 12a296b commit f5549af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

git-svn.perl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ sub _req_svn {
5959
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
6060
use IPC::Open3;
6161
use Git;
62+
use Memoize; # core since 5.8.0, Jul 2002
6263

6364
BEGIN {
6465
# import functions from Git into our packages, en masse
@@ -72,6 +73,8 @@ BEGIN
7273
*{"${package}::$_"} = \&{"Git::$_"};
7374
}
7475
}
76+
Memoize::memoize 'Git::config';
77+
Memoize::memoize 'Git::config_bool';
7578
}
7679

7780
my ($SVN);
@@ -3210,6 +3213,8 @@ sub has_no_changes {
32103213
Memoize::unmemoize 'check_cherry_pick';
32113214
Memoize::unmemoize 'has_no_changes';
32123215
}
3216+
3217+
Memoize::memoize 'Git::SVN::repos_root';
32133218
}
32143219

32153220
END {

0 commit comments

Comments
 (0)