diff options
author | René Scharfe <l.s.r@web.de> | 2022-10-29 12:06:06 +0200 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2022-10-31 00:50:43 +0100 |
commit | 1e4ea950f7a83240e15f5e77369cf700b94e8759 (patch) | |
tree | 16f59142c91397e585f27ede92bd600512d6ee83 /t/t5000-tar-tree.sh | |
parent | The eighth batch (diff) | |
download | git-1e4ea950f7a83240e15f5e77369cf700b94e8759.tar.xz git-1e4ea950f7a83240e15f5e77369cf700b94e8759.zip |
archive-tar: report filter start error only once
A missing tar filter is reported by start_command() using error(), but
also by its caller, write_tar_filter_archive(), using die():
$ git -c tar.invalid.command=foo archive --format=invalid HEAD
error: cannot run foo: No such file or directory
fatal: unable to start 'foo' filter: No such file or directory
The second message contains all relevant information and even says that
the failed command was intended to be used as a filter. Silence the
first one because it's redundant.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to '')
-rwxr-xr-x | t/t5000-tar-tree.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index eaa0b22ece..d473048138 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -342,6 +342,13 @@ test_expect_success 'only enabled filters are available remotely' ' test_cmp_bin remote.bar config.bar ' +test_expect_success 'invalid filter is reported only once' ' + test_must_fail git -c tar.invalid.command= archive --format=invalid \ + HEAD >out 2>err && + test_must_be_empty out && + test_line_count = 1 err +' + test_expect_success 'git archive --format=tgz' ' git archive --format=tgz HEAD >j.tgz ' |