diff options
author | Jeff King <peff@peff.net> | 2023-05-08 15:01:12 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-05-08 14:50:28 -0700 |
commit | b1c8ac3996e25c5764431f5ede122684474415c5 (patch) | |
tree | 670343c0331712edd99a8403cf1bec2831a5c198 /generate-cmdlist.sh | |
parent | 69c786637d7a7fe3b2b8f7d989af095f5f49c3a8 (diff) | |
download | git-b1c8ac3996e25c5764431f5ede122684474415c5.tar.gz |
t7001: avoid git on upstream of pipe
We generally avoid git on the left-hand side of a pipe, because it loses
the exit code of the command (and thus we'd miss things like segfaults
or unexpected failures). In the cases in t7001, we wouldn't expect
failures (they are just inspecting the repository state, and are not the
main point of the test), but it doesn't hurt to be careful.
In all but one case here we're piping "ls-files --stage" to cut off the
pathname (since we compare entries before and after moving). Let's pull
that into a helper function to avoid repeating the slightly awkward
replacement.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'generate-cmdlist.sh')
0 files changed, 0 insertions, 0 deletions