Skip to content

Commit 1d9b265

Browse files
amerygitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1a8fb15 commit 1d9b265

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-am.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ do
421421
else
422422
action=yes
423423
fi
424-
FIRSTLINE=$(head -1 "$dotest/final-commit")
424+
FIRSTLINE=$(sed 1q "$dotest/final-commit")
425425

426426
if test $action = skip
427427
then

0 commit comments

Comments
 (0)