{"thread":{"id":"14000","subject":"[PATCH] git-am: head -1 is obsolete and doesn't work on some new systems","startedAt":"2008-06-17T11:43:57Z","lastAt":"2008-06-17T11:43:57Z","messageCount":1,"participants":["Alejandro Mery"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"80132","messageId":"4857A37D.8040004@geeks.cl","threadId":"14000","inReplyTo":null,"subject":"[PATCH] git-am: head -1 is obsolete and doesn't work on some new systems","fromName":"Alejandro Mery","fromEmail":"amery@geeks.cl","sentAt":"2008-06-17T11:43:57Z","receivedAt":"2008-06-17T11:43:57Z","isPatch":true,"sender":{"key":"amery@geeks.cl","avatar":"https://gravatar.com/avatar/d970331bf1ac3470522d61807b93272ed89720f9afbb683cd1a81ca91806d877?d=mp&s=160"},"body":"head -<n> was deprecated by POSIX, and as modern versions of coreutils\npackage don't support it at least one exports _POSIX2_VERSION=199209\nit's fails on some systems.\n\nhead -n<n> is portable, but sed <n>q is even more.\n\nSigned-off-by: Alejandro Mery <amery@geeks.cl>\n---\n git-am.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex b48096e..2c517ed 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -421,7 +421,7 @@ do\n \telse\n \t    action=yes\n \tfi\n-\tFIRSTLINE=$(head -1 \"$dotest/final-commit\")\n+\tFIRSTLINE=$(sed 1q \"$dotest/final-commit\")\n \n \tif test $action = skip\n \tthen\n--\n1.5.4.3 \n"}]}