{"thread":{"id":"3135","subject":"[PATCH] rev-{list,parse}: allow -<n> as shorthand for --max-count=<n>","startedAt":"2006-01-24T07:29:46Z","lastAt":"2006-01-30T00:28:02Z","messageCount":11,"participants":["Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15081","messageId":"20060124072946.GA9468@Muzzle","threadId":"3135","inReplyTo":null,"subject":"[PATCH] rev-{list,parse}: allow -<n> as shorthand for --max-count=<n>","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-01-24T07:29:46Z","receivedAt":"2006-01-24T07:29:46Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Some versions of head(1) and tail(1) allow their line limits to be\nparsed this way.  I find --max-count to be a commonly used option,\nand also similar in spirit to head/tail, so I decided to make life\neasier on my worn out (and lazy :) fingers with this patch.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n rev-list.c  |    5 +++++\n rev-parse.c |    4 ++++\n 2 files changed, 9 insertions(+), 0 deletions(-)\n\n68df4b28986a4642119373e18a63751be0e26366\ndiff --git a/rev-list.c b/rev-list.c\nindex d060966..2bbd699 100644\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -732,6 +732,11 @@ int main(int argc, const char **argv)\n \t\tstruct commit *commit;\n \t\tunsigned char sha1[20];\n \n+\t\t/* accept, -<digit>, like some versions of head/tail  */\n+\t\tif (*arg == '-' && isdigit(arg[1])) {\n+\t\t\tmax_count = atoi(arg + 1);\n+\t\t\tcontinue;\n+\t\t}\n \t\tif (!strncmp(arg, \"--max-count=\", 12)) {\n \t\t\tmax_count = atoi(arg + 12);\n \t\t\tcontinue;\ndiff --git a/rev-parse.c b/rev-parse.c\nindex 0c951af..4dfc1a9 100644\n--- a/rev-parse.c\n+++ b/rev-parse.c\n@@ -52,6 +52,10 @@ static int is_rev_argument(const char *a\n \t};\n \tconst char **p = rev_args;\n \n+\t/* accept, -<digit>, like some versions of head/tail  */\n+\tif (*arg == '-' && isdigit(arg[1]))\n+\t\treturn 1;\n+\n \tfor (;;) {\n \t\tconst char *str = *p++;\n \t\tint len;\n-- \n1.1.4.g68df\n"},{"id":"15082","messageId":"7vd5iicauh.fsf@assigned-by-dhcp.cox.net","threadId":"3135","inReplyTo":"20060124072946.GA9468@Muzzle","subject":"Re: [PATCH] rev-{list,parse}: allow -<n> as shorthand for --max-count=<n>","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-24T08:02:30Z","receivedAt":"2006-01-24T08:02:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Some versions of head(1) and tail(1) allow their line limits to be\n> parsed this way.  I find --max-count to be a commonly used option,\n> and also similar in spirit to head/tail, so I decided to make life\n> easier on my worn out (and lazy :) fingers with this patch.\n\nAs an old timer, I personally am very used to \"head -4\", but\nalso have been training my fingers to say \"head -n 4\" for the\npast few years, because the former is not POSIXly correct.\n\nAt the same time, I agree that --max-count *was* a mistake.  We\nshould maybe say \"-n <n>\" perhaps?\n"},{"id":"15104","messageId":"20060125063325.GA7953@mail.yhbt.net","threadId":"3135","inReplyTo":"7vd5iicauh.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] rev-{list,parse}: allow -<n> as shorthand for --max-count=<n>","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-01-25T06:33:25Z","receivedAt":"2006-01-25T06:33:25Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n> > Some versions of head(1) and tail(1) allow their line limits to be\n> > parsed this way.  I find --max-count to be a commonly used option,\n> > and also similar in spirit to head/tail, so I decided to make life\n> > easier on my worn out (and lazy :) fingers with this patch.\n> \n> As an old timer, I personally am very used to \"head -4\", but\n> also have been training my fingers to say \"head -n 4\" for the\n> past few years, because the former is not POSIXly correct.\n\nI don't agree with POSIX on this point, and I don't see why git should\nbe bound to POSIX, especially at the UI level just because it's POSIX.\n\nFwiw, head/tail in coreutils distributed by Debian still supports -<n>\nalongside -n <n> and -n<n>.\n\n> At the same time, I agree that --max-count *was* a mistake.  We\n> should maybe say \"-n <n>\" perhaps?\n\nThen, -n<n> (w/o the space) should be supported as well.  Heck, I've\nbeen wanting GNU getopt_long() option parsing in git for a while.  Not\nsure if I'll have time to implement it myself any time soon, though.\n\n-- \nEric Wong\n"},{"id":"15112","messageId":"7v8xt4ws5r.fsf@assigned-by-dhcp.cox.net","threadId":"3135","inReplyTo":"20060125063325.GA7953@mail.yhbt.net","subject":"Re: [PATCH] rev-{list,parse}: allow -<n> as shorthand for --max-count=<n>","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-25T09:52:48Z","receivedAt":"2006-01-25T09:52:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> I don't agree with POSIX on this point, and I don't see why git should\n> be bound to POSIX, especially at the UI level just because it's POSIX.\n\nUnfortunately, it does not matter in the real world that you and\nI both do not particularly like \"head -n 4\".  We will see more\npeople who feel \"-n 4\" more familiar than \"-4\", unlike old\nfashioned people like myself.\n\n> ...  Heck, I've\n> been wanting GNU getopt_long() option parsing in git for a while...\n\nWe find somebody who wants to do this every now and then, it\nseems.  Last time somebody brought this up in late May 2005, we\nwere still a \"too rapidly moving\" target, adding and changing\noptions every other day, and the actual implementation went\nnowhere while the discussion was reasonably healthy.  If I\nrecall the discussion correctly, argp instead of GNU getopt was\nthe list favorite back then...\n"},{"id":"15199","messageId":"20060129134056.GA3428@Muzzle","threadId":"3135","inReplyTo":"20060125063325.GA7953@mail.yhbt.net","subject":"[PATCH] rev-{list,parse}: allow -n<n> as shorthand for --max-count=<n>","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-01-29T13:40:56Z","receivedAt":"2006-01-29T13:40:56Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Both -n<n> and -n <n> are supported.  POSIX versions of head(1) and\ntail(1) allow their line limits to be parsed this way.  I find\n--max-count to be a commonly used option, and also similar in spirit to\nhead/tail, so I decided to make life easier on my worn out (and lazy :)\nfingers with this patch.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n rev-list.c  |   10 ++++++++++\n rev-parse.c |   19 +++++++++++++++++++\n 2 files changed, 29 insertions(+), 0 deletions(-)\n\na598ce380cfcf01b27be92bca92a3c451d3b41e3\ndiff --git a/rev-list.c b/rev-list.c\nindex e00e6fc..33541cc 100644\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -732,6 +732,16 @@ int main(int argc, const char **argv)\n \t\tstruct commit *commit;\n \t\tunsigned char sha1[20];\n \n+\t\tif (!strcmp(arg, \"-n\")) {\n+\t\t\tif (++i >= argc)\n+\t\t\t\tdie(\"-n requires an argument\");\n+\t\t\tmax_count = atoi(argv[i]);\n+\t\t\tcontinue;\n+\t\t}\n+\t\tif (!strncmp(arg,\"-n\",2)) {\n+\t\t\tmax_count = atoi(arg + 2);\n+\t\t\tcontinue;\n+\t\t}\n \t\tif (!strncmp(arg, \"--max-count=\", 12)) {\n \t\t\tmax_count = atoi(arg + 12);\n \t\t\tcontinue;\ndiff --git a/rev-parse.c b/rev-parse.c\nindex 7abad35..3790463 100644\n--- a/rev-parse.c\n+++ b/rev-parse.c\n@@ -21,6 +21,7 @@ static char *def = NULL;\n static int show_type = NORMAL;\n static int symbolic = 0;\n static int output_sq = 0;\n+static int next_arg_is_rev = 0;\n \n static int revs_count = 0;\n \n@@ -162,6 +163,24 @@ int main(int argc, char **argv)\n \t\t\tshow_file(arg);\n \t\t\tcontinue;\n \t\t}\n+\t\tif (next_arg_is_rev) {\n+\t\t\tif ((filter & DO_FLAGS) && (filter & DO_REVS))\n+\t\t\t\tshow(arg);\n+\t\t\tnext_arg_is_rev = 0;\n+\t\t\tcontinue;\n+\t\t}\n+\t\tif (!strcmp(arg,\"-n\")) {\n+\t\t\tnext_arg_is_rev = 1;\n+\t\t\tif ((filter & DO_FLAGS) && (filter & DO_REVS))\n+\t\t\t\tshow(arg);\n+\t\t\tcontinue;\n+\t\t}\n+\t\tif (!strncmp(arg,\"-n\",2)) {\n+\t\t\tif ((filter & DO_FLAGS) && (filter & DO_REVS))\n+\t\t\t\tshow(arg);\n+\t\t\tcontinue;\n+\t\t}\n+\n \t\tif (*arg == '-') {\n \t\t\tif (!strcmp(arg, \"--\")) {\n \t\t\t\tas_is = 1;\n-- \n1.1.4.g3b65\n"},{"id":"15200","messageId":"20060129134720.GB3428@Muzzle","threadId":"3135","inReplyTo":"20060129134056.GA3428@Muzzle","subject":"[PATCH] rev-{list,parse}: optionally allow -<n> as shorthand for --max-count=<n>","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-01-29T13:47:20Z","receivedAt":"2006-01-29T13:47:20Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"I also made this for my own private use, it's on top of the previous\none I made that is POSIX-friendly.  I don't if you or anyone wants\nit merged mainline, but I like it :)\n\nThis will only be enabled if POSIX_SHMOSIX is defined at compile-time.\n\nSome versions of head(1) and tail(1) allow their line limits to be\nparsed this way.  I find --max-count to be a commonly used option,\nand also similar in spirit to head/tail, so I decided to make life\neasier on my worn out (and lazy :) fingers with this patch.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n Makefile          |    3 +++\n git-compat-util.h |    3 +++\n rev-list.c        |    7 ++++++-\n rev-parse.c       |    4 ++++\n 4 files changed, 16 insertions(+), 1 deletions(-)\n\n3b650b00deb7e51e5c9a8bdc4cc1eaaf4fc65029\ndiff --git a/Makefile b/Makefile\nindex 2e95353..9ef97ca 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -367,6 +367,9 @@ endif\n ifdef NO_IPV6\n \tALL_CFLAGS += -DNO_IPV6\n endif\n+ifdef POSIX_SHMOSIX\n+\tALL_CFLAGS += -DPOSIX_SHMOSIX=1\n+endif\n ifdef NO_SOCKADDR_STORAGE\n ifdef NO_IPV6\n \tALL_CFLAGS += -Dsockaddr_storage=sockaddr_in\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex f982b8e..46d331d 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -154,4 +154,7 @@ static inline int sane_case(int x, int h\n #ifndef MAXPATHLEN\n #define MAXPATHLEN 256\n #endif\n+#ifndef POSIX_SHMOSIX \n+#define POSIX_SHMOSIX 0\n+#endif\n #endif\ndiff --git a/rev-list.c b/rev-list.c\nindex 33541cc..c85de51 100644\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -731,7 +731,12 @@ int main(int argc, const char **argv)\n \t\tchar *dotdot;\n \t\tstruct commit *commit;\n \t\tunsigned char sha1[20];\n-\n+\t\t\n+\t\t/* accept, -<digit>, like some versions of head/tail  */\n+\t\tif (POSIX_SHMOSIX && (*arg == '-') && isdigit(arg[1])) {\n+\t\t\tmax_count = atoi(arg + 1);\n+\t\t\tcontinue;\n+\t\t}\n \t\tif (!strcmp(arg, \"-n\")) {\n \t\t\tif (++i >= argc)\n \t\t\t\tdie(\"-n requires an argument\");\ndiff --git a/rev-parse.c b/rev-parse.c\nindex 3790463..d9b3fa9 100644\n--- a/rev-parse.c\n+++ b/rev-parse.c\n@@ -53,6 +53,10 @@ static int is_rev_argument(const char *a\n \t};\n \tconst char **p = rev_args;\n \n+\t/* accept, -<digit>, like some versions of head/tail  */\n+\tif (POSIX_SHMOSIX && (*arg == '-') && isdigit(arg[1]))\n+\t\treturn 1;\n+\n \tfor (;;) {\n \t\tconst char *str = *p++;\n \t\tint len;\n-- \n1.1.4.g3b65\n"},{"id":"15222","messageId":"7vbqxukcyo.fsf@assigned-by-dhcp.cox.net","threadId":"3135","inReplyTo":"20060129134056.GA3428@Muzzle","subject":"Re: [PATCH] rev-{list,parse}: allow -n<n> as shorthand for --max-count=<n>","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-29T20:15:27Z","receivedAt":"2006-01-29T20:15:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Both -n<n> and -n <n> are supported.  POSIX versions of head(1) and\n> tail(1) allow their line limits to be parsed this way.  I find\n> --max-count to be a commonly used option, and also similar in spirit to\n> head/tail, so I decided to make life easier on my worn out (and lazy :)\n> fingers with this patch.\n\nI agree with this in principle.\n\n> diff --git a/rev-parse.c b/rev-parse.c\n> index 7abad35..3790463 100644\n> --- a/rev-parse.c\n> +++ b/rev-parse.c\n> @@ -21,6 +21,7 @@ static char *def = NULL;\n>  static int show_type = NORMAL;\n>  static int symbolic = 0;\n>  static int output_sq = 0;\n> +static int next_arg_is_rev = 0;\n\nDo you need this here, or can it be made auto in main()?\n"},{"id":"15223","messageId":"7v64o2kcym.fsf@assigned-by-dhcp.cox.net","threadId":"3135","inReplyTo":"20060129134720.GB3428@Muzzle","subject":"Re: [PATCH] rev-{list,parse}: optionally allow -<n> as shorthand for --max-count=<n>","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-29T20:15:29Z","receivedAt":"2006-01-29T20:15:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> This will only be enabled if POSIX_SHMOSIX is defined at compile-time.\n\nMaybe a better name would be POSIX_ME_HARDER ^W oops, POSIXLY_CORRECT\nto disable this?\n"},{"id":"15234","messageId":"20060130002501.GB15482@Muzzle","threadId":"3135","inReplyTo":"7vbqxukcyo.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] rev-{list,parse}: allow -n<n> as shorthand for --max-count=<n>","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-01-30T00:25:02Z","receivedAt":"2006-01-30T00:25:02Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n> > Both -n<n> and -n <n> are supported.  POSIX versions of head(1) and\n> > tail(1) allow their line limits to be parsed this way.  I find\n> > --max-count to be a commonly used option, and also similar in spirit to\n> > head/tail, so I decided to make life easier on my worn out (and lazy :)\n> > fingers with this patch.\n> \n> I agree with this in principle.\n> \n> > diff --git a/rev-parse.c b/rev-parse.c\n> > index 7abad35..3790463 100644\n> > --- a/rev-parse.c\n> > +++ b/rev-parse.c\n> > @@ -21,6 +21,7 @@ static char *def = NULL;\n> >  static int show_type = NORMAL;\n> >  static int symbolic = 0;\n> >  static int output_sq = 0;\n> > +static int next_arg_is_rev = 0;\n> \n> Do you need this here, or can it be made auto in main()?\n\nOops, I had changes in is_rev_argument() that I eventually\nmoved entirely to main().  Cleaned up patch on the way.\n\n-- \nEric Wong\n"},{"id":"15235","messageId":"20060130002640.GC15482@Muzzle","threadId":"3135","inReplyTo":"20060130002501.GB15482@Muzzle","subject":"[PATCH] rev-{list,parse}: allow -n<n> as shorthand for --max-count=<n>","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-01-30T00:26:40Z","receivedAt":"2006-01-30T00:26:40Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Both -n<n> and -n <n> are supported.  POSIX versions of head(1) and\ntail(1) allow their line limits to be parsed this way.  I find\n--max-count to be a commonly used option, and also similar in spirit to\nhead/tail, so I decided to make life easier on my worn out (and lazy :)\nfingers with this patch.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n rev-list.c  |   10 ++++++++++\n rev-parse.c |   15 +++++++++++++++\n 2 files changed, 25 insertions(+), 0 deletions(-)\n\na7f5327966f8ccdf887f3c63db3147135ff20983\ndiff --git a/rev-list.c b/rev-list.c\nindex 0b142c1..4565755 100644\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -749,6 +749,16 @@ int main(int argc, const char **argv)\n \t\tstruct commit *commit;\n \t\tunsigned char sha1[20];\n \n+\t\tif (!strcmp(arg, \"-n\")) {\n+\t\t\tif (++i >= argc)\n+\t\t\t\tdie(\"-n requires an argument\");\n+\t\t\tmax_count = atoi(argv[i]);\n+\t\t\tcontinue;\n+\t\t}\n+\t\tif (!strncmp(arg,\"-n\",2)) {\n+\t\t\tmax_count = atoi(arg + 2);\n+\t\t\tcontinue;\n+\t\t}\n \t\tif (!strncmp(arg, \"--max-count=\", 12)) {\n \t\t\tmax_count = atoi(arg + 12);\n \t\t\tcontinue;\ndiff --git a/rev-parse.c b/rev-parse.c\nindex d2f0864..3c99a79 100644\n--- a/rev-parse.c\n+++ b/rev-parse.c\n@@ -165,6 +165,21 @@ int main(int argc, char **argv)\n \t\t\tshow_file(arg);\n \t\t\tcontinue;\n \t\t}\n+\t\tif (!strcmp(arg,\"-n\")) {\n+\t\t\tif (++i >= argc)\n+\t\t\t\tdie(\"-n requires an argument\");\n+\t\t\tif ((filter & DO_FLAGS) && (filter & DO_REVS)) {\n+\t\t\t\tshow(arg);\n+\t\t\t\tshow(argv[i]);\n+\t\t\t}\n+\t\t\tcontinue;\n+\t\t}\n+\t\tif (!strncmp(arg,\"-n\",2)) {\n+\t\t\tif ((filter & DO_FLAGS) && (filter & DO_REVS))\n+\t\t\t\tshow(arg);\n+\t\t\tcontinue;\n+\t\t}\n+\n \t\tif (*arg == '-') {\n \t\t\tif (!strcmp(arg, \"--\")) {\n \t\t\t\tas_is = 1;\n-- \n1.1.5.ga7f5-dirty\n"},{"id":"15236","messageId":"20060130002802.GD15482@Muzzle","threadId":"3135","inReplyTo":"7v64o2kcym.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] rev-{list,parse}: allow -<n> as shorthand for --max-count=<n>","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-01-30T00:28:02Z","receivedAt":"2006-01-30T00:28:02Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"This will be enabled unless POSIXLY_CORRECT or POSIX_ME_HARDER is set\nin the environment.\n\nSome versions of head(1) and tail(1) allow their line limits to be\nparsed this way.  I find --max-count to be a commonly used option,\nand also similar in spirit to head/tail, so I decided to make life\neasier on my worn out (and lazy :) fingers with this patch.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n git-compat-util.h |    8 ++++++++\n rev-list.c        |    5 +++++\n rev-parse.c       |    4 ++++\n 3 files changed, 17 insertions(+), 0 deletions(-)\n\n7a8d6dda7dacadc90377fc56d28d5d03493199c4\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex f982b8e..b2512ba 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -154,4 +154,12 @@ static inline int sane_case(int x, int h\n #ifndef MAXPATHLEN\n #define MAXPATHLEN 256\n #endif\n+\n+static inline int posixly_correct(void)\n+{\n+\tif (getenv(\"POSIXLY_CORRECT\") || getenv(\"POSIX_ME_HARDER\"))\n+\t\treturn 1;\n+\treturn 0;\n+}\n+\n #endif\ndiff --git a/rev-list.c b/rev-list.c\nindex 4565755..f29d32a 100644\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -749,6 +749,11 @@ int main(int argc, const char **argv)\n \t\tstruct commit *commit;\n \t\tunsigned char sha1[20];\n \n+\t\t/* accept, -<digit>, like some versions of head/tail  */\n+\t\tif (!posixly_correct() && (*arg == '-') && isdigit(arg[1])) {\n+\t\t\tmax_count = atoi(arg + 1);\n+\t\t\tcontinue;\n+\t\t}\n \t\tif (!strcmp(arg, \"-n\")) {\n \t\t\tif (++i >= argc)\n \t\t\t\tdie(\"-n requires an argument\");\ndiff --git a/rev-parse.c b/rev-parse.c\nindex 3c99a79..2966a33 100644\n--- a/rev-parse.c\n+++ b/rev-parse.c\n@@ -53,6 +53,10 @@ static int is_rev_argument(const char *a\n \t};\n \tconst char **p = rev_args;\n \n+\t/* accept, -<digit>, like some versions of head/tail  */\n+\tif (!posixly_correct() && (*arg == '-') && isdigit(arg[1]))\n+\t\treturn 1;\n+\n \tfor (;;) {\n \t\tconst char *str = *p++;\n \t\tint len;\n-- \n1.1.5.ga7f5-dirty\n"}]}