{"thread":{"id":"10319","subject":"[PATCH] git-commit.sh: Remove option -n from tail","startedAt":"2007-10-16T16:57:14Z","lastAt":"2007-10-16T22:06:24Z","messageCount":10,"participants":["Jari Aalto","David Brown","YOSHIFUJI Hideaki / 吉藤英明","Johannes Schindelin","Florian Weimer","Theodore Tso"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"56088","messageId":"1192553837-18302-1-git-send-email-jari.aalto@cante.net","threadId":"10319","inReplyTo":null,"subject":"[PATCH] tail -n not supported in all OSs","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-10-16T16:57:14Z","receivedAt":"2007-10-16T16:57:14Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"\nSunOS/Solaris tail(1) does not support option '-n'. The\nfollowing patches change occurrances of:\n\n   tail -n <N>\n\nto\n\n   tail <N>\n\n---------------------------------------------------------------------\nREFERENCES:\n\nUser Commands                                             TAIL(1)\n                        \nNAME\n     tail - output the last part of files\n\nSYNOPSIS\n     tail [OPTION]... [FILE]...\n\n- - -\n\n$ uname -a\nSunOS host 5.9 Generic_118558-35 sun4u sparc SUNW,Serverblade1\n\n$ echo | tail -n 1\n\nusage: tail [+/-[n][lbc][f]] [file]\n       tail [+/-[n][l][r|f]] [file]                     \n"},{"id":"56089","messageId":"1192553837-18302-2-git-send-email-jari.aalto@cante.net","threadId":"10319","inReplyTo":"1192553837-18302-1-git-send-email-jari.aalto@cante.net","subject":"[PATCH] git-am.sh: Remove option -n from tail","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-10-16T16:57:15Z","receivedAt":"2007-10-16T16:57:15Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n---\n git-am.sh |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex b02ae6a..09a991c 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -2,6 +2,8 @@\n #\n # Copyright (c) 2005, 2006 Junio C Hamano\n \n+TAIL=\"tail\"\n+\n USAGE='[--signoff] [--dotest=<dir>] [--keep] [--utf8 | --no-utf8]\n   [--3way] [--interactive] [--binary]\n   [--whitespace=<option>] [-C<n>] [-p<n>]\n@@ -321,7 +323,7 @@ do\n \t\tLAST_SIGNED_OFF_BY=`\n \t\t    sed -ne '/^Signed-off-by: /p' \\\n \t\t    \"$dotest/msg-clean\" |\n-\t\t    tail -n 1\n+\t\t    $TAIL 1\n \t\t`\n \t\tADD_SIGNOFF=`\n \t\t    test \"$LAST_SIGNED_OFF_BY\" = \"$SIGNOFF\" || {\n-- \n1.5.3.2.81.g17ed\n"},{"id":"56086","messageId":"1192553837-18302-3-git-send-email-jari.aalto@cante.net","threadId":"10319","inReplyTo":"1192553837-18302-2-git-send-email-jari.aalto@cante.net","subject":"[PATCH] git-commit.sh: Remove option -n from tail","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-10-16T16:57:16Z","receivedAt":"2007-10-16T16:57:16Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n---\n git-commit.sh |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex fcb8443..637cf48 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -3,6 +3,8 @@\n # Copyright (c) 2005 Linus Torvalds\n # Copyright (c) 2006 Junio C Hamano\n \n+TAIL=\"tail\"\n+\n USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [--template <file>] [[-i | -o] <path>...]'\n SUBDIRECTORY_OK=Yes\n . git-sh-setup\n@@ -442,10 +444,10 @@ t)\n \t\ts/^/Signed-off-by: /\n \t\t')\n \tblank_before_signoff=\n-\ttail -n 1 \"$GIT_DIR\"/COMMIT_EDITMSG |\n+\t$TAIL 1 \"$GIT_DIR\"/COMMIT_EDITMSG |\n \tgrep 'Signed-off-by:' >/dev/null || blank_before_signoff='\n '\n-\ttail -n 1 \"$GIT_DIR\"/COMMIT_EDITMSG |\n+\t$TAIL 1 \"$GIT_DIR\"/COMMIT_EDITMSG |\n \tgrep \"$sign\"$ >/dev/null ||\n \tprintf '%s%s\\n' \"$blank_before_signoff\" \"$sign\" \\\n \t\t>>\"$GIT_DIR\"/COMMIT_EDITMSG\n-- \n1.5.3.2.81.g17ed\n"},{"id":"56087","messageId":"1192553837-18302-4-git-send-email-jari.aalto@cante.net","threadId":"10319","inReplyTo":"1192553837-18302-3-git-send-email-jari.aalto@cante.net","subject":"[PATCH] git-rebase--interactive.sh: Remove option -n from tail","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-10-16T16:57:17Z","receivedAt":"2007-10-16T16:57:17Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n---\n git-rebase--interactive.sh |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 050140d..58e164c 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -10,6 +10,8 @@\n # The original idea comes from Eric W. Biederman, in\n # http://article.gmane.org/gmane.comp.version-control.git/22407\n \n+TAIL=\"tail\"\n+\n USAGE='(--continue | --abort | --skip | [--preserve-merges] [--verbose]\n \t[--onto <branch>] <upstream> [<branch>])'\n \n@@ -204,7 +206,7 @@ nth_string () {\n make_squash_message () {\n \tif test -f \"$SQUASH_MSG\"; then\n \t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n-\t\t\t< \"$SQUASH_MSG\" | tail -n 1)+1))\n+\t\t\t< \"$SQUASH_MSG\" | $TAIL 1)+1))\n \t\techo \"# This is a combination of $COUNT commits.\"\n \t\tsed -n \"2,\\$p\" < \"$SQUASH_MSG\"\n \telse\n-- \n1.5.3.2.81.g17ed\n"},{"id":"56090","messageId":"20071016171206.GA13715@old.davidb.org","threadId":"10319","inReplyTo":"1192553837-18302-1-git-send-email-jari.aalto@cante.net","subject":"Re: [PATCH] tail -n not supported in all OSs","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-10-16T17:12:06Z","receivedAt":"2007-10-16T17:12:06Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"On Tue, Oct 16, 2007 at 07:57:14PM +0300, Jari Aalto wrote:\n>\n>SunOS/Solaris tail(1) does not support option '-n'. The\n>following patches change occurrances of:\n>\n>   tail -n <N>\n>\n>to\n>\n>   tail <N>\n\nOn Linux, I get\n\n   tail: cannot open `1' for reading: No such file or directory\n\nDid you want\n\n   tail -<N>\n\nDavid\n"},{"id":"56091","messageId":"20071017.021606.45991429.yoshfuji@linux-ipv6.org","threadId":"10319","inReplyTo":"1192553837-18302-1-git-send-email-jari.aalto@cante.net","subject":"Re: [PATCH] tail -n not supported in all OSs","fromName":"YOSHIFUJI Hideaki / 吉藤英明","fromEmail":"yoshfuji@linux-ipv6.org","sentAt":"2007-10-16T17:16:06Z","receivedAt":"2007-10-16T17:16:06Z","isPatch":true,"sender":{"key":"yoshfuji@linux-ipv6.org","avatar":"https://gravatar.com/avatar/92c288bb8d3e34afd7bb1574cc1079a3d0aa6d36d80955d1ec6a1cea2868d392?d=mp&s=160"},"body":"In article <1192553837-18302-1-git-send-email-jari.aalto@cante.net> (at Tue, 16 Oct 2007 19:57:14 +0300), Jari Aalto <jari.aalto@cante.net> says:\n\n> \n> SunOS/Solaris tail(1) does not support option '-n'. The\n> following patches change occurrances of:\n> \n>    tail -n <N>\n> \n> to\n> \n>    tail <N>\n\nYou should say \"tail -<N>\".\n\n--yoshfuji\n"},{"id":"56093","messageId":"Pine.LNX.4.64.0710161818230.25221@racer.site","threadId":"10319","inReplyTo":"1192553837-18302-3-git-send-email-jari.aalto@cante.net","subject":"Re: [PATCH] git-commit.sh: Remove option -n from tail","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-16T17:18:51Z","receivedAt":"2007-10-16T17:18:51Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 16 Oct 2007, Jari Aalto wrote:\n\n> Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n\nRationale?\n\nAnd also, can't this wait for the builtin-commit, which will solve this \nproblem?\n\nCiao,\nDscho\n"},{"id":"56094","messageId":"Pine.LNX.4.64.0710161819180.25221@racer.site","threadId":"10319","inReplyTo":"1192553837-18302-1-git-send-email-jari.aalto@cante.net","subject":"Re: [PATCH] tail -n not supported in all OSs","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-16T17:19:35Z","receivedAt":"2007-10-16T17:19:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 16 Oct 2007, Jari Aalto wrote:\n\n> \n> SunOS/Solaris tail(1) does not support option '-n'.\n\nThis belongs into the commit message.\n\nCiao,\nDscho\n"},{"id":"56121","messageId":"878x62dcdl.fsf@mid.deneb.enyo.de","threadId":"10319","inReplyTo":"1192553837-18302-1-git-send-email-jari.aalto@cante.net","subject":"Re: [PATCH] tail -n not supported in all OSs","fromName":"Florian Weimer","fromEmail":"fw@deneb.enyo.de","sentAt":"2007-10-16T20:37:42Z","receivedAt":"2007-10-16T20:37:42Z","isPatch":true,"sender":{"key":"fw@deneb.enyo.de","avatar":null},"body":"* Jari Aalto:\n\n> $ uname -a\n> SunOS host 5.9 Generic_118558-35 sun4u sparc SUNW,Serverblade1\n>\n> $ echo | tail -n 1\n>\n> usage: tail [+/-[n][lbc][f]] [file]\n>        tail [+/-[n][l][r|f]] [file]                     \n\nWhat about /usr/xpg4/bin/tail?  Why aren't you using that?\n"},{"id":"56132","messageId":"20071016220624.GC1314@closure.lan","threadId":"10319","inReplyTo":"1192553837-18302-1-git-send-email-jari.aalto@cante.net","subject":"Re: [PATCH] tail -n not supported in all OSs","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-10-16T22:06:24Z","receivedAt":"2007-10-16T22:06:24Z","isPatch":true,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Oct 16, 2007 at 07:57:14PM +0300, Jari Aalto wrote:\n> \n> SunOS/Solaris tail(1) does not support option '-n'. The\n> following patches change occurrances of:\n> \n>    tail -n <N>\n> \n> to\n> \n>    tail <N>\n\nPOSIX.2 guarantees that \"tail -n 2\" works.  \"Tail -<N>\" is considered\nobsolete.  Unfortunately Solaris requires you to use\n/usr/xpg4/bin/tail if you want a POSIX.2 compliant header file.  The\n/usr/bin/tail is designed for System V R3 compliance (i.e., from a\nfull two decades ago; SVR3 was released in 1987), and is due to Sun's\nvow to Backwards Compatible Forever. \n\nSee \"man 5 standards\" on a Solaris box to see how your PATH variable\nhas to be set if you want something which is compatible with modern\nUnix/Linux common usage.\n\n\t\t\t\t\t- Ted\n"}]}