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>
This commit is contained in:

committed by
Junio C Hamano

parent
aadbe44f88
commit
b4ce54fc61
@ -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
|
||||
|
Reference in New Issue
Block a user