about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rwxr-xr-xscript/public-inbox-learn2
-rw-r--r--t/mda.t1
2 files changed, 2 insertions, 1 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn
index 09fd7c8f..396ab489 100755
--- a/script/public-inbox-learn
+++ b/script/public-inbox-learn
@@ -57,7 +57,7 @@ foreach my $recipient (keys %dests) {
         my $git = PublicInbox::Git->new($git_dir);
         # We do not touch GIT_COMMITTER_* env here so we can track
         # who trained the message.
-        my $name = $ENV{GIT_COMMITTER_NAME} || $dst->{inbox};
+        my $name = $ENV{GIT_COMMITTER_NAME} || $dst->{name};
         my $email = $ENV{GIT_COMMITTER_EMAIL} || $recipient;
         my $im = PublicInbox::Import->new($git, $name, $email);
 
diff --git a/t/mda.t b/t/mda.t
index 32154bdc..886b4cb9 100644
--- a/t/mda.t
+++ b/t/mda.t
@@ -187,6 +187,7 @@ EOF
                 # now train it
                 local $ENV{GIT_AUTHOR_EMAIL} = 'trainer@example.com';
                 local $ENV{GIT_COMMITTER_EMAIL} = 'trainer@example.com';
+                local $ENV{GIT_COMMITTER_NAME} = undef;
                 IPC::Run::run([$learn, "spam"], \$msg);
                 is($?, 0, "no failure from learning spam");
                 IPC::Run::run([$learn, "spam"], \$msg);