From: Alejandro Mery Date: Tue, 17 Jun 2008 11:43:57 +0000 (+0200) Subject: git-am: head -1 is obsolete and doesn't work on some new systems X-Git-Tag: v1.5.6~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1d9b26562e12fabd60bb4174b7e6b10f4f4a0ec8;p=git.git git-am: head -1 is obsolete and doesn't work on some new systems head - was deprecated by POSIX, and as modern versions of coreutils package don't support it at least one exports _POSIX2_VERSION=199209 it's fails on some systems. head -n is portable, but sed q is even more. Signed-off-by: Alejandro Mery Signed-off-by: Junio C Hamano --- diff --git a/git-am.sh b/git-am.sh index b48096ec2..2c517ede5 100755 --- a/git-am.sh +++ b/git-am.sh @@ -421,7 +421,7 @@ do else action=yes fi - FIRSTLINE=$(head -1 "$dotest/final-commit") + FIRSTLINE=$(sed 1q "$dotest/final-commit") if test $action = skip then