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/v1-add-remove-add.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/v1-add-remove-add.t') diff --git a/t/v1-add-remove-add.t b/t/v1-add-remove-add.t index 736e414e..fdf06a96 100644 --- a/t/v1-add-remove-add.t +++ b/t/v1-add-remove-add.t @@ -9,7 +9,6 @@ use PublicInbox::TestCommon; require_mods(qw(DBD::SQLite Search::Xapian)); require PublicInbox::SearchIdx; my ($inboxdir, $for_destroy) = tmpdir(); -is(system(qw(git init --bare -q), $inboxdir), 0); my $ibx = { inboxdir => $inboxdir, name => 'test-add-remove-add', @@ -27,6 +26,7 @@ my $mime = PublicInbox::MIME->create( body => "hello world\n", ); my $im = PublicInbox::Import->new($ibx->git, undef, undef, $ibx); +$im->init_bare; ok($im->add($mime), 'message added'); ok($im->remove($mime), 'message removed'); ok($im->add($mime), 'message added again'); -- cgit v1.2.3-24-ge0c7