aboutsummaryrefslogtreecommitdiffstats
path: root/t/t7501-commit-basic-functionality.sh
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-11-27 11:53:36 -0800
committerJunio C Hamano <gitster@pobox.com>2019-11-29 13:20:15 -0800
commiteacaa1c18096e96c391c1246e91c43f35834e49e (patch)
treea4440b6d53e1a3185566512bbb0396defe4b603a /t/t7501-commit-basic-functionality.sh
parentt5317: use ! grep to check for no matching lines (diff)
downloadgit-eacaa1c18096e96c391c1246e91c43f35834e49e.tar.gz
git-eacaa1c18096e96c391c1246e91c43f35834e49e.zip
t5703: simplify one-time-sed generation logic
In inconsistency(), we had two `git rev-parse` invocations in the upstream of a pipe within a command substitution. In case this invocation ever failed, its exit code would be swallowed up and we would not know about it. Pull the command substitutions out into variable assignments so that their return codes are not lost. Drop the pipe into `tr` because the $(...) substitution already takes care of stripping out newlines, so the `tr` invocations in the code are superfluous. Finally, given the way the tests actually employ "one-time-sed" via $(cat one-time-sed) in t/lib-httpd/apply-one-time-sed.sh, convert the `printf` into an `echo`. This makes it consistent with the final "server loses a ref - ref in want" test, which does use `echo` rather than `printf`. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7501-commit-basic-functionality.sh')
0 files changed, 0 insertions, 0 deletions