unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] learn: fix uninitialized variable
@ 2016-07-26  1:00 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-07-26  1:00 UTC (permalink / raw)
  To: meta

Oops :x
---
 script/public-inbox-learn | 2 +-
 t/mda.t                   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/script/public-inbox-learn b/script/public-inbox-learn
index 09fd7c8..396ab48 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 32154bd..886b4cb 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);
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-26  1:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-26  1:00 [PATCH] learn: fix uninitialized variable Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).