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 /git-rebase--interactive.sh | |
parent | aadbe44f883859536c5320e0ac1d6ed122c45671 (diff) | |
download | git-b4ce54fc61e7c76e2d7f47c34733f0f0bbb6c4cd.tar.gz git-b4ce54fc61e7c76e2d7f47c34733f0f0bbb6c4cd.tar.xz |
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 'git-rebase--interactive.sh')
-rwxr-xr-x | git-rebase--interactive.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 4c3280a76..8aa73712c 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -218,7 +218,7 @@ nth_string () { make_squash_message () { if test -f "$SQUASH_MSG"; then COUNT=$(($(sed -n "s/^# This is [^0-9]*\([1-9][0-9]*\).*/\1/p" \ - < "$SQUASH_MSG" | tail -n 1)+1)) + < "$SQUASH_MSG" | sed -ne '$p')+1)) echo "# This is a combination of $COUNT commits." sed -e 1d -e '2,/^./{ /^$/d |