Skip to content

Commit 3e9303d

Browse files
committed
Merge branch 'rs/archive-filter-error-once'
"git archive" mistakenly complained twice about a missing executable, which has been corrected. * rs/archive-filter-error-once: archive-tar: report filter start error only once
2 parents ec9a46a + 1e4ea95 commit 3e9303d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

archive-tar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ static int write_tar_filter_archive(const struct archiver *ar,
498498
strvec_push(&filter.args, cmd.buf);
499499
filter.use_shell = 1;
500500
filter.in = -1;
501+
filter.silent_exec_failure = 1;
501502

502503
if (start_command(&filter) < 0)
503504
die_errno(_("unable to start '%s' filter"), cmd.buf);

t/t5000-tar-tree.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,13 @@ test_expect_success 'only enabled filters are available remotely' '
342342
test_cmp_bin remote.bar config.bar
343343
'
344344

345+
test_expect_success 'invalid filter is reported only once' '
346+
test_must_fail git -c tar.invalid.command= archive --format=invalid \
347+
HEAD >out 2>err &&
348+
test_must_be_empty out &&
349+
test_line_count = 1 err
350+
'
351+
345352
test_expect_success 'git archive --format=tgz' '
346353
git archive --format=tgz HEAD >j.tgz
347354
'

0 commit comments

Comments
 (0)