aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2015-11-30 20:45:38 +0000
committerSimon McVittie <smcv@debian.org>2015-11-30 20:46:58 +0000
commit8550c397016bd66095f24de64b077526e08bbab2 (patch)
tree33f3b400e545204a148d4432430572b469560923
parente800be12fd7f26f8107c256c10d1c7b3046c2a30 (diff)
downloadikiwiki-8550c397016bd66095f24de64b077526e08bbab2.tar
ikiwiki-8550c397016bd66095f24de64b077526e08bbab2.tar.gz
Don't memoize ensure_committer
This makes it harder to test, and if we're invoking git anyway, a couple of extra subprocesses are no big deal.
-rw-r--r--IkiWiki/Plugin/git.pm5
1 files changed, 0 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index 38254d94a..12e79f3dd 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -220,10 +220,7 @@ sub run_or_die ($@) { safe_git(\&error, undef, @_) }
sub run_or_cry ($@) { safe_git(sub { warn @_ }, undef, @_) }
sub run_or_non ($@) { safe_git(undef, undef, @_) }
-my $ensured_committer;
sub ensure_committer {
- return if $ensured_committer;
-
my $name = join('', run_or_non("git", "config", "user.name"));
my $email = join('', run_or_non("git", "config", "user.email"));
@@ -234,8 +231,6 @@ sub ensure_committer {
if (! length $email) {
run_or_die("git", "config", "user.email", "ikiwiki.info");
}
-
- $ensured_committer = 1;
}
sub merge_past ($$$) {