From d55abcc42bde846d9047491125dd2b32645dafd8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Apr 2020 23:19:34 +0000 Subject: import: init_bare: allow use as method, use in tests Allowing ->init_bare to be used as a method saves some keystrokes, and we can save a little bit of time on systems with our vfork(2)-enabled spawn(). This also sets us up for future improvements where we can avoid spawning a process at all. --- t/watch_maildir.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't/watch_maildir.t') diff --git a/t/watch_maildir.t b/t/watch_maildir.t index 5fb908fb..9ed04cab 100644 --- a/t/watch_maildir.t +++ b/t/watch_maildir.t @@ -6,6 +6,7 @@ use Email::MIME; use Cwd; use PublicInbox::Config; use PublicInbox::TestCommon; +use PublicInbox::Import; require_mods(qw(Filesys::Notify::Simple)); my ($tmpdir, $for_destroy) = tmpdir(); my $git_dir = "$tmpdir/test.git"; @@ -15,7 +16,7 @@ use_ok 'PublicInbox::WatchMaildir'; use_ok 'PublicInbox::Emergency'; my $cfgpfx = "publicinbox.test"; my $addr = 'test-public@example.com'; -is(system(qw(git init -q --bare), $git_dir), 0, 'initialized git dir'); +PublicInbox::Import::init_bare($git_dir); my $msg = <