use PublicInbox::Import;
use File::Temp;
use File::Path qw(remove_tree);
-use Digest::SHA qw(sha1_hex);
+use PublicInbox::SHA qw(sha1_hex);
require_mods(qw(json Plack::Builder HTTP::Date HTTP::Status));
require_git '1.8.5';
require_ok 'PublicInbox::LeiMirror';
}
my $cmd = [qw(-clone --inbox-config=never --manifest= --project-list=
- --objstore= -p -q), $url, "$tmpdir/dst"];
+ --objstore= -p -q), $url, "$tmpdir/dst", '--exit-code'];
ok(run_script($cmd), 'clone');
is(xqx([qw(git config gitweb.owner)], { GIT_DIR => "$tmpdir/dst/a.git" }),
"Alice\n", 'a.git gitweb.owner set');
unlink($log) or xbail "unlink: $!";
ok(run_script($x, $env), "no-op clone @clone_arg w/ post-update-hook");
ok(!-e $log, "hooks not run on no-op @clone_arg");
+
+ push @$x, '--exit-code';
+ ok(!run_script($x, $env), 'no-op clone w/ --exit-code fails');
+ is($? >> 8, 127, '--exit-code gave 127');
};
$test_puh->();
ok(!-e "$tmpdir/dst/objstore", 'no objstore, yet');