git-am: head -1 is obsolete and doesn't work on some new systems
head -<n> 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<n> is portable, but sed <n>q is even more. Signed-off-by: Alejandro Mery <amery@geeks.cl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alejandro Mery committed
Jun 17, 2008 at 13:43 UTC
1d9b26562e12fabd60bb4174b7e6b10f4f4a0ec8
1 file changed
+1
-1
git-am.sh
+1
-1
@@ -421,7 +421,7 @@ do
421
else
422
action=yes
423
fi
424
- FIRSTLINE=$(head -1 "$dotest/final-commit")
424
+ FIRSTLINE=$(sed 1q "$dotest/final-commit")
425
426
if test $action = skip
427
then