]> git.ipfire.org Git - thirdparty/git.git/commit
t1010: don't create unused files
authorAndrei Rybak <rybak.a.v@gmail.com>
Sat, 18 Mar 2023 15:46:42 +0000 (16:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Mar 2023 16:11:41 +0000 (09:11 -0700)
commitf4b98e17cf290883894606623e90d42747bce25e
tree13e12aacd153173f2f1d360c7808606284bd9603
parent4e273368cedd0e4bc6a12782199c1789e02ebb51
t1010: don't create unused files

Builtin "git mktree" writes the the object name of the tree object built
to the standard output.  Tests 'mktree refuses to read ls-tree -r output
(1)' and 'mktree refuses to read ls-tree -r output (2)' in
"t1010-mktree.sh" redirect output of "git mktree" to a file, but don't
use its contents in assertions.

Don't redirect output of "git mktree" to file "actual" in tests that
assert that an invocation of "git mktree" must fail.

Output of "git mktree" is empty when it refuses to build a tree object.
So, alternatively, the test could assert that the output is empty.
However, there isn't a good reason for the user to expect the command to
be silent in such cases, so we shouldn't enforce it.  The user shouldn't
use the output of a failing command anyway.

Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1010-mktree.sh