diff options
author | Jeff King <peff@peff.net> | 2008-03-12 17:34:34 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-13 00:57:52 -0700 |
commit | b4ce54fc61e7c76e2d7f47c34733f0f0bbb6c4cd (patch) | |
tree | 4bb61d23645a1402c253f7b40e3ed9653999914a /t/t3404-rebase-interactive.sh | |
parent | aadbe44f883859536c5320e0ac1d6ed122c45671 (diff) | |
download | git-b4ce54fc61e7c76e2d7f47c34733f0f0bbb6c4cd.tar.gz |
remove use of "tail -n 1" and "tail -1"
The "-n" syntax is not supported by System V versions of
tail (which prefer "tail -1"). Unfortunately "tail -1" is
not actually POSIX. We had some of both forms in our
scripts.
Since neither form works everywhere, this patch replaces
both with the equivalent sed invocation:
sed -ne '$p'
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index f09823106f..9c0acc5a7e 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -122,8 +122,8 @@ test_expect_success 'reflog for the branch shows state before rebase' ' test_expect_success 'exchange two commits' ' FAKE_LINES="2 1" git rebase -i HEAD~2 && - test H = $(git cat-file commit HEAD^ | tail -n 1) && - test G = $(git cat-file commit HEAD | tail -n 1) + test H = $(git cat-file commit HEAD^ | sed -ne \$p) && + test G = $(git cat-file commit HEAD | sed -ne \$p) ' cat > expect << EOF |