{"thread":{"id":"25380","subject":"[PATCH] Documentation: update-index: -z applies also to --index-info","startedAt":"2010-10-07T13:23:17Z","lastAt":"2010-10-08T06:50:20Z","messageCount":13,"participants":["Bert Wesarg","Štěpán Němec","Jonathan Nieder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"152872","messageId":"d3f7e6795adeccbf7746547842d6b65732d568eb.1286457739.git.bert.wesarg@googlemail.com","threadId":"25380","inReplyTo":null,"subject":"[PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-07T13:23:17Z","receivedAt":"2010-10-07T13:23:17Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Also mention, that --stdin and --index-info needs to be the last\noption supplied and indicate this in the usage string.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\n---\n\nWe may like the usage string like this:\n\n[[-z] --stdin | --index-info]\n\nto make it also clear, that -z applies only to --stdin or --index-only.\n---\n Documentation/git-update-index.txt |   14 ++++++++------\n 1 files changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt\nindex 74d1d49..4441d7c 100644 Documentation/git-update-index.txt\n--- a/Documentation/git-update-index.txt\n+++ b/Documentation/git-update-index.txt\n@@ -18,8 +18,9 @@ SYNOPSIS\n \t     [--skip-worktree | --no-skip-worktree]\n \t     [--ignore-submodules]\n \t     [--really-refresh] [--unresolve] [--again | -g]\n-\t     [--info-only] [--index-info]\n-\t     [-z] [--stdin]\n+\t     [--info-only]\n+\t     [-z]\n+\t     [--stdin] [--index-info]\n \t     [--verbose]\n \t     [--] [<file>]*\n \n@@ -72,7 +73,7 @@ OPTIONS\n \tDirectly insert the specified info into the index.\n \n --index-info::\n-        Read index information from stdin.\n+        Read index information from stdin (Must be last option).\n \n --chmod=(+|-)x::\n         Set the execute permissions on the updated files.\n@@ -138,14 +139,15 @@ you will need to handle the situation manually.\n --stdin::\n \tInstead of taking list of paths from the command line,\n \tread list of paths from the standard input.  Paths are\n-\tseparated by LF (i.e. one path per line) by default.\n+\tseparated by LF (i.e. one path per line) by default\n+\t(Must be last option).\n \n --verbose::\n         Report what is being added and removed from index.\n \n -z::\n-\tOnly meaningful with `--stdin`; paths are separated with\n-\tNUL character instead of LF.\n+\tOnly meaningful with `--stdin` or `--index-info`; paths are\n+\tseparated with NUL character instead of LF.\n \n \\--::\n \tDo not interpret any more arguments as options.\n-- \n1.7.1.1067.g5aeb7\n"},{"id":"152902","messageId":"87wrptua21.fsf@gmail.com","threadId":"25380","inReplyTo":"d3f7e6795adeccbf7746547842d6b65732d568eb.1286457739.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Štěpán Němec","fromEmail":"stepnem@gmail.com","sentAt":"2010-10-07T18:33:58Z","receivedAt":"2010-10-07T18:33:58Z","isPatch":true,"sender":{"key":"stepnem@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106838?v=4"},"body":"Bert Wesarg <bert.wesarg@googlemail.com> writes:\n\n> Also mention, that --stdin and --index-info needs to be the last\n> option supplied and indicate this in the usage string.\n>\n> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n>\n> ---\n>\n> We may like the usage string like this:\n>\n> [[-z] --stdin | --index-info]\n\nYeah, that'd be definitely better IMO.\n\nAlso the usage string in builtin/update-index.c should be updated to the\nsame effect.\n\nThere is actually at least one more problem with the current SYNOPSIS of\n`update-index'. Obviously the `*' on the third line of the Asciidoc\nsource makes the whole `--cacheinfo' line disappear and the rest bold\n(cf. e.g. the result at\n<http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html>).\n\nI guess using `...' instead of the asterisks (also on the last line,\ni.e. [<file>...], not [<file>]*) would both fix the problem and at the\nsame time make it more consistent with other man pages.\n\n> to make it also clear, that -z applies only to --stdin or --index-only.\n> ---\n>  Documentation/git-update-index.txt |   14 ++++++++------\n>  1 files changed, 8 insertions(+), 6 deletions(-)\n>\n> diff --git a/Documentation/git-update-index.txt\n> b/Documentation/git-update-index.txt\n> index 74d1d49..4441d7c 100644 Documentation/git-update-index.txt\n> --- a/Documentation/git-update-index.txt\n> +++ b/Documentation/git-update-index.txt\n> @@ -18,8 +18,9 @@ SYNOPSIS\n>  \t     [--skip-worktree | --no-skip-worktree]\n>  \t     [--ignore-submodules]\n>  \t     [--really-refresh] [--unresolve] [--again | -g]\n> -\t     [--info-only] [--index-info]\n> -\t     [-z] [--stdin]\n> +\t     [--info-only]\n> +\t     [-z]\n> +\t     [--stdin] [--index-info]\n>  \t     [--verbose]\n>  \t     [--] [<file>]*\n\nShouldn't `--verbose' be also moved before the must-be-last options?\n\n> @@ -72,7 +73,7 @@ OPTIONS\n>  \tDirectly insert the specified info into the index.\n>  \n>  --index-info::\n> -        Read index information from stdin.\n> +        Read index information from stdin (Must be last option).\n\nI'm not a native speaker myself, but I suspect \"must be THE last option\"\nis more correct (including the lower-case `m' :-)).\n\n>  --chmod=(+|-)x::\n>          Set the execute permissions on the updated files.\n> @@ -138,14 +139,15 @@ you will need to handle the situation manually.\n>  --stdin::\n>  \tInstead of taking list of paths from the command line,\n>  \tread list of paths from the standard input.  Paths are\n> -\tseparated by LF (i.e. one path per line) by default.\n> +\tseparated by LF (i.e. one path per line) by default\n> +\t(Must be last option).\n\n(same here)\n\n>  \n>  --verbose::\n>          Report what is being added and removed from index.\n>  \n>  -z::\n> -\tOnly meaningful with `--stdin`; paths are separated with\n> -\tNUL character instead of LF.\n> +\tOnly meaningful with `--stdin` or `--index-info`; paths are\n> +\tseparated with NUL character instead of LF.\n>  \n>  \\--::\n>  \tDo not interpret any more arguments as options.\n\nThanks,\n\nŠtěpán\n"},{"id":"152904","messageId":"AANLkTimsJ+uG7KhiBMii8szFYmbXo5OjAkYgs99_Hjzr@mail.gmail.com","threadId":"25380","inReplyTo":"87wrptua21.fsf@gmail.com","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-07T18:52:47Z","receivedAt":"2010-10-07T18:52:47Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Thu, Oct 7, 2010 at 20:33, Štěpán Němec <stepnem@gmail.com> wrote:\n> Bert Wesarg <bert.wesarg@googlemail.com> writes:\n>\n>> Also mention, that --stdin and --index-info needs to be the last\n>> option supplied and indicate this in the usage string.\n>>\n>> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n>>\n>> ---\n>>\n>> We may like the usage string like this:\n>>\n>> [[-z] --stdin | --index-info]\n>\n> Yeah, that'd be definitely better IMO.\n\nWill do.\n\n>\n> Also the usage string in builtin/update-index.c should be updated to the\n> same effect.\n>\n> There is actually at least one more problem with the current SYNOPSIS of\n> `update-index'. Obviously the `*' on the third line of the Asciidoc\n> source makes the whole `--cacheinfo' line disappear and the rest bold\n> (cf. e.g. the result at\n> <http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html>).\n>\n> I guess using `...' instead of the asterisks (also on the last line,\n> i.e. [<file>...], not [<file>]*) would both fix the problem and at the\n> same time make it more consistent with other man pages.\n\nI wont change it in this patch, because I can't build the html docs right now.\n\n>\n>> to make it also clear, that -z applies only to --stdin or --index-only.\n>> ---\n>>  Documentation/git-update-index.txt |   14 ++++++++------\n>>  1 files changed, 8 insertions(+), 6 deletions(-)\n>>\n>> diff --git a/Documentation/git-update-index.txt\n>> b/Documentation/git-update-index.txt\n>> index 74d1d49..4441d7c 100644 Documentation/git-update-index.txt\n>> --- a/Documentation/git-update-index.txt\n>> +++ b/Documentation/git-update-index.txt\n>> @@ -18,8 +18,9 @@ SYNOPSIS\n>>            [--skip-worktree | --no-skip-worktree]\n>>            [--ignore-submodules]\n>>            [--really-refresh] [--unresolve] [--again | -g]\n>> -          [--info-only] [--index-info]\n>> -          [-z] [--stdin]\n>> +          [--info-only]\n>> +          [-z]\n>> +          [--stdin] [--index-info]\n>>            [--verbose]\n>>            [--] [<file>]*\n>\n> Shouldn't `--verbose' be also moved before the must-be-last options?\n\nSure. I noticed this myself, but the patch was already in the wire.\n\n>\n>> @@ -72,7 +73,7 @@ OPTIONS\n>>       Directly insert the specified info into the index.\n>>\n>>  --index-info::\n>> -        Read index information from stdin.\n>> +        Read index information from stdin (Must be last option).\n>\n> I'm not a native speaker myself, but I suspect \"must be THE last option\"\n> is more correct (including the lower-case `m' :-)).\n\nMaybe this should be in its own sentence, like the '(Implies\n--remove.)' in --force-remove.\n\n>\n>>  --chmod=(+|-)x::\n>>          Set the execute permissions on the updated files.\n>> @@ -138,14 +139,15 @@ you will need to handle the situation manually.\n>>  --stdin::\n>>       Instead of taking list of paths from the command line,\n>>       read list of paths from the standard input.  Paths are\n>> -     separated by LF (i.e. one path per line) by default.\n>> +     separated by LF (i.e. one path per line) by default\n>> +     (Must be last option).\n>\n> (same here)\n>\n>>\n>>  --verbose::\n>>          Report what is being added and removed from index.\n>>\n>>  -z::\n>> -     Only meaningful with `--stdin`; paths are separated with\n>> -     NUL character instead of LF.\n>> +     Only meaningful with `--stdin` or `--index-info`; paths are\n>> +     separated with NUL character instead of LF.\n>>\n>>  \\--::\n>>       Do not interpret any more arguments as options.\n>\n> Thanks,\n\nThank you.\n\nBert\n\n>\n> Štěpán\n>\n"},{"id":"152908","messageId":"AANLkTikiOmM0q=XoAJ0nOnr6SChj7PZZJfmXzaihGZMu@mail.gmail.com","threadId":"25380","inReplyTo":"AANLkTimsJ+uG7KhiBMii8szFYmbXo5OjAkYgs99_Hjzr@mail.gmail.com","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-07T18:55:24Z","receivedAt":"2010-10-07T18:55:24Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Thu, Oct 7, 2010 at 20:52, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> On Thu, Oct 7, 2010 at 20:33, Štěpán Němec <stepnem@gmail.com> wrote:\n>>\n>> Also the usage string in builtin/update-index.c should be updated to the\n>> same effect.\n>>\n>> There is actually at least one more problem with the current SYNOPSIS of\n>> `update-index'. Obviously the `*' on the third line of the Asciidoc\n>> source makes the whole `--cacheinfo' line disappear and the rest bold\n>> (cf. e.g. the result at\n>> <http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html>).\n\nls-files too:\nhttp://www.kernel.org/pub/software/scm/git/docs/git-ls-files.html\n\nSo it deserve more attention and its own patch.\n"},{"id":"152905","messageId":"081ad1459d5b1584cbe474581bd3a01d0d58d11d.1286477945.git.bert.wesarg@googlemail.com","threadId":"25380","inReplyTo":"AANLkTimsJ+uG7KhiBMii8szFYmbXo5OjAkYgs99_Hjzr@mail.gmail.com","subject":"[PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-07T18:59:51Z","receivedAt":"2010-10-07T18:59:51Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Also mention, that --stdin and --index-info needs to be the last\noption supplied and indicate this in the usage string.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n Documentation/git-update-index.txt |   13 +++++++------\n builtin/update-index.c             |    2 +-\n 2 files changed, 8 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt\nindex 74d1d49..022c0fc 100644 Documentation/git-update-index.txt\n--- a/Documentation/git-update-index.txt\n+++ b/Documentation/git-update-index.txt\n@@ -18,10 +18,10 @@ SYNOPSIS\n \t     [--skip-worktree | --no-skip-worktree]\n \t     [--ignore-submodules]\n \t     [--really-refresh] [--unresolve] [--again | -g]\n-\t     [--info-only] [--index-info]\n-\t     [-z] [--stdin]\n+\t     [--info-only]\n \t     [--verbose]\n-\t     [--] [<file>]*\n+\t     [[-z] --stdin | --index-info]\n+\t     [--] [<file>]\n \n DESCRIPTION\n -----------\n@@ -72,7 +72,7 @@ OPTIONS\n \tDirectly insert the specified info into the index.\n \n --index-info::\n-        Read index information from stdin.\n+        Read index information from stdin. (Must be the last option.)\n \n --chmod=(+|-)x::\n         Set the execute permissions on the updated files.\n@@ -139,13 +139,14 @@ you will need to handle the situation manually.\n \tInstead of taking list of paths from the command line,\n \tread list of paths from the standard input.  Paths are\n \tseparated by LF (i.e. one path per line) by default.\n+\t(Must be the last option.)\n \n --verbose::\n         Report what is being added and removed from index.\n \n -z::\n-\tOnly meaningful with `--stdin`; paths are separated with\n-\tNUL character instead of LF.\n+\tOnly meaningful with `--stdin` or `--index-info`; paths are\n+\tseparated with NUL character instead of LF.\n \n \\--::\n \tDo not interpret any more arguments as options.\ndiff --git a/builtin/update-index.c b/builtin/update-index.c\nindex 3ab214d..2c1a81e 100644 builtin/update-index.c\n--- a/builtin/update-index.c\n+++ b/builtin/update-index.c\n@@ -398,7 +398,7 @@ static void read_index_info(int line_termination)\n }\n \n static const char update_index_usage[] =\n-\"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...\";\n+\"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--unresolve] [--again | -g] [--ignore-missing] [--verbose] [[-z] --stdin | --index-info] [--] <file>...\";\n \n static unsigned char head_sha1[20];\n static unsigned char merge_head_sha1[20];\n-- \n1.7.1.1067.g5aeb7\n"},{"id":"152918","messageId":"20101007191548.GA11955@burratino","threadId":"25380","inReplyTo":"AANLkTikiOmM0q=XoAJ0nOnr6SChj7PZZJfmXzaihGZMu@mail.gmail.com","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-10-07T19:15:48Z","receivedAt":"2010-10-07T19:15:48Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Bert Wesarg wrote:\n> On Thu, Oct 7, 2010 at 20:52, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n>> On Thu, Oct 7, 2010 at 20:33, Štěpán Němec <stepnem@gmail.com> wrote:\n\n>>> There is actually at least one more problem with the current SYNOPSIS of\n>>> `update-index'. Obviously the `*' on the third line of the Asciidoc\n>>> source makes the whole `--cacheinfo' line disappear and the rest bold\n>>> (cf. e.g. the result at\n>>> <http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html>).\n>\n> ls-files too:\n> http://www.kernel.org/pub/software/scm/git/docs/git-ls-files.html\n\nHmph, this is from v1.7.3-rc0~15^2~9 (Documentation: remove backslashes\nin manpage synopses, 2010-08-20).  And it still works for me locally\n(for both manpage and HTML generation). :(\n\nAnyway, the \"...\" fix sounds good to me (or {asterisk} if the stars are\nstill wanted).\n"},{"id":"152919","messageId":"87sk0hu7lb.fsf@gmail.com","threadId":"25380","inReplyTo":"20101007191548.GA11955@burratino","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Štěpán Němec","fromEmail":"stepnem@gmail.com","sentAt":"2010-10-07T19:27:12Z","receivedAt":"2010-10-07T19:27:12Z","isPatch":true,"sender":{"key":"stepnem@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106838?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Bert Wesarg wrote:\n>> On Thu, Oct 7, 2010 at 20:52, Bert Wesarg <bert.wesarg@googlemail.com>\n> wrote:\n>>> On Thu, Oct 7, 2010 at 20:33, Štěpán Němec <stepnem@gmail.com> wrote:\n>\n>>>> There is actually at least one more problem with the current SYNOPSIS of\n>>>> `update-index'. Obviously the `*' on the third line of the Asciidoc\n>>>> source makes the whole `--cacheinfo' line disappear and the rest bold\n>>>> (cf. e.g. the result at\n>>>> <http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html>).\n>>\n>> ls-files too:\n>> http://www.kernel.org/pub/software/scm/git/docs/git-ls-files.html\n>\n> Hmph, this is from v1.7.3-rc0~15^2~9 (Documentation: remove backslashes\n> in manpage synopses, 2010-08-20).  And it still works for me locally\n> (for both manpage and HTML generation). :(\n>\n> Anyway, the \"...\" fix sounds good to me (or {asterisk} if the stars are\n> still wanted).\n\nYeah, there are some more actually. I'll send in a separate patch shortly.\n\nŠtěpán\n"},{"id":"152921","messageId":"87ocb5u75s.fsf@gmail.com","threadId":"25380","inReplyTo":"081ad1459d5b1584cbe474581bd3a01d0d58d11d.1286477945.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Štěpán Němec","fromEmail":"stepnem@gmail.com","sentAt":"2010-10-07T19:36:31Z","receivedAt":"2010-10-07T19:36:31Z","isPatch":true,"sender":{"key":"stepnem@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106838?v=4"},"body":"Bert Wesarg <bert.wesarg@googlemail.com> writes:\n\n> Also mention, that --stdin and --index-info needs to be the last\n> option supplied and indicate this in the usage string.\n>\n> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n> ---\n>  Documentation/git-update-index.txt |   13 +++++++------\n>  builtin/update-index.c             |    2 +-\n>  2 files changed, 8 insertions(+), 7 deletions(-)\n>\n> diff --git a/Documentation/git-update-index.txt\n> b/Documentation/git-update-index.txt\n> index 74d1d49..022c0fc 100644 Documentation/git-update-index.txt\n> --- a/Documentation/git-update-index.txt\n> +++ b/Documentation/git-update-index.txt\n> @@ -18,10 +18,10 @@ SYNOPSIS\n>  \t     [--skip-worktree | --no-skip-worktree]\n>  \t     [--ignore-submodules]\n>  \t     [--really-refresh] [--unresolve] [--again | -g]\n> -\t     [--info-only] [--index-info]\n> -\t     [-z] [--stdin]\n> +\t     [--info-only]\n>  \t     [--verbose]\n> -\t     [--] [<file>]*\n> +\t     [[-z] --stdin | --index-info]\n> +\t     [--] [<file>]\n\nIf you want to remove the asterisk after all, then please make it\n`<file>...', not `[<file>]'.\n\nŠtěpán\n"},{"id":"152922","messageId":"AANLkTinJhKHxds3e+SwYHCbN4S_tcvE1P8j4mgwh+W00@mail.gmail.com","threadId":"25380","inReplyTo":"87ocb5u75s.fsf@gmail.com","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-07T19:39:12Z","receivedAt":"2010-10-07T19:39:12Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Thu, Oct 7, 2010 at 21:36, Štěpán Němec <stepnem@gmail.com> wrote:\n> Bert Wesarg <bert.wesarg@googlemail.com> writes:\n>\n>> Also mention, that --stdin and --index-info needs to be the last\n>> option supplied and indicate this in the usage string.\n>>\n>> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n>> ---\n>>  Documentation/git-update-index.txt |   13 +++++++------\n>>  builtin/update-index.c             |    2 +-\n>>  2 files changed, 8 insertions(+), 7 deletions(-)\n>>\n>> diff --git a/Documentation/git-update-index.txt\n>> b/Documentation/git-update-index.txt\n>> index 74d1d49..022c0fc 100644 Documentation/git-update-index.txt\n>> --- a/Documentation/git-update-index.txt\n>> +++ b/Documentation/git-update-index.txt\n>> @@ -18,10 +18,10 @@ SYNOPSIS\n>>            [--skip-worktree | --no-skip-worktree]\n>>            [--ignore-submodules]\n>>            [--really-refresh] [--unresolve] [--again | -g]\n>> -          [--info-only] [--index-info]\n>> -          [-z] [--stdin]\n>> +          [--info-only]\n>>            [--verbose]\n>> -          [--] [<file>]*\n>> +          [[-z] --stdin | --index-info]\n>> +          [--] [<file>]\n>\n> If you want to remove the asterisk after all, then please make it\n> `<file>...', not `[<file>]'.\n\nSorry. That was only by accident. Updated patch will follow.\n\nBert\n\n>\n> Štěpán\n>\n"},{"id":"152923","messageId":"337062f16e5b354be20b0af53a63f5c540ab0eb8.1286480355.git.bert.wesarg@googlemail.com","threadId":"25380","inReplyTo":"AANLkTinJhKHxds3e+SwYHCbN4S_tcvE1P8j4mgwh+W00@mail.gmail.com","subject":"[PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-07T19:39:39Z","receivedAt":"2010-10-07T19:39:39Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Also mention, that --stdin and --index-info needs to be the last\noption supplied and indicate this in the usage string.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n Documentation/git-update-index.txt |   11 ++++++-----\n builtin/update-index.c             |    2 +-\n 2 files changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt\nindex 74d1d49..0999950 100644 Documentation/git-update-index.txt\n--- a/Documentation/git-update-index.txt\n+++ b/Documentation/git-update-index.txt\n@@ -18,9 +18,9 @@ SYNOPSIS\n \t     [--skip-worktree | --no-skip-worktree]\n \t     [--ignore-submodules]\n \t     [--really-refresh] [--unresolve] [--again | -g]\n-\t     [--info-only] [--index-info]\n-\t     [-z] [--stdin]\n+\t     [--info-only]\n \t     [--verbose]\n+\t     [[-z] --stdin | --index-info]\n \t     [--] [<file>]*\n \n DESCRIPTION\n@@ -72,7 +72,7 @@ OPTIONS\n \tDirectly insert the specified info into the index.\n \n --index-info::\n-        Read index information from stdin.\n+        Read index information from stdin. (Must be the last option.)\n \n --chmod=(+|-)x::\n         Set the execute permissions on the updated files.\n@@ -139,13 +139,14 @@ you will need to handle the situation manually.\n \tInstead of taking list of paths from the command line,\n \tread list of paths from the standard input.  Paths are\n \tseparated by LF (i.e. one path per line) by default.\n+\t(Must be the last option.)\n \n --verbose::\n         Report what is being added and removed from index.\n \n -z::\n-\tOnly meaningful with `--stdin`; paths are separated with\n-\tNUL character instead of LF.\n+\tOnly meaningful with `--stdin` or `--index-info`; paths are\n+\tseparated with NUL character instead of LF.\n \n \\--::\n \tDo not interpret any more arguments as options.\ndiff --git a/builtin/update-index.c b/builtin/update-index.c\nindex 3ab214d..2c1a81e 100644 builtin/update-index.c\n--- a/builtin/update-index.c\n+++ b/builtin/update-index.c\n@@ -398,7 +398,7 @@ static void read_index_info(int line_termination)\n }\n \n static const char update_index_usage[] =\n-\"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...\";\n+\"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--unresolve] [--again | -g] [--ignore-missing] [--verbose] [[-z] --stdin | --index-info] [--] <file>...\";\n \n static unsigned char head_sha1[20];\n static unsigned char merge_head_sha1[20];\n-- \n1.7.1.1067.g5aeb7\n"},{"id":"152944","messageId":"7viq1dwg8v.fsf@alter.siamese.dyndns.org","threadId":"25380","inReplyTo":"337062f16e5b354be20b0af53a63f5c540ab0eb8.1286480355.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-10-08T02:49:36Z","receivedAt":"2010-10-08T02:49:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bert Wesarg <bert.wesarg@googlemail.com> writes:\n\n> diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt\n> index 74d1d49..0999950 100644 Documentation/git-update-index.txt\n> --- a/Documentation/git-update-index.txt\n> +++ b/Documentation/git-update-index.txt\n> @@ -18,9 +18,9 @@ SYNOPSIS\n>  \t     [--skip-worktree | --no-skip-worktree]\n>  \t     [--ignore-submodules]\n>  \t     [--really-refresh] [--unresolve] [--again | -g]\n> -\t     [--info-only] [--index-info]\n> -\t     [-z] [--stdin]\n> +\t     [--info-only]\n>  \t     [--verbose]\n> +\t     [[-z] --stdin | --index-info]\n\nHmm, this requires | to bind tighter than [] around -z, but that is a bit\ncounterintuitive.\n\nAlso, you can put -z much earlier, e.g. \"update-index -z --add --stdin\",\nand your version gives a false impression that we do not allow that.\n\nWriting it as \"[-z] [--stdin | --index-info]\" would be much easier to\nread, even though it won't convey that -z will be no-op unless we are\nreading from the standard input, either with --stdin or --index-info.\n\nI actually think we can easily lift the \"must be at the end\" limitation\nfrom both codepaths.\n\nMove the --stdin codepath to a separate helper like read_index_info(),\nremove the limitation, and add a new limitation that --stdin/--index-info\ncan be given only once (as the reader will read thru EOF and the second\ncall to the reader won't help us).  And do the reading after processing\nall the command line stuff (i.e. move read_index_info() call after the\noption parsing loop), to allow \"update-index --stdin --add hello.c\" to add\nnew paths read from standard input and also hello.c was given from the\ncommand line.\n\nWouldn't it make much more sense to spend brain cycles to write and review\nsuch a patch, rather than documenting an unnecessary limitation?\n\nHmm?\n"},{"id":"152949","messageId":"AANLkTimWOWHfLtiP8BkQ8ORMhjiyiAZm7Gn+OmQ2USfT@mail.gmail.com","threadId":"25380","inReplyTo":"7viq1dwg8v.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-08T06:47:54Z","receivedAt":"2010-10-08T06:47:54Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Fri, Oct 8, 2010 at 04:49, Junio C Hamano <gitster@pobox.com> wrote:\n> Bert Wesarg <bert.wesarg@googlemail.com> writes:\n>\n>> diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt\n>> index 74d1d49..0999950 100644 Documentation/git-update-index.txt\n>> --- a/Documentation/git-update-index.txt\n>> +++ b/Documentation/git-update-index.txt\n>> @@ -18,9 +18,9 @@ SYNOPSIS\n>>            [--skip-worktree | --no-skip-worktree]\n>>            [--ignore-submodules]\n>>            [--really-refresh] [--unresolve] [--again | -g]\n>> -          [--info-only] [--index-info]\n>> -          [-z] [--stdin]\n>> +          [--info-only]\n>>            [--verbose]\n>> +          [[-z] --stdin | --index-info]\n>\n> Hmm, this requires | to bind tighter than [] around -z, but that is a bit\n> counterintuitive.\n>\n> Also, you can put -z much earlier, e.g. \"update-index -z --add --stdin\",\n> and your version gives a false impression that we do not allow that.\n>\n> Writing it as \"[-z] [--stdin | --index-info]\" would be much easier to\n> read, even though it won't convey that -z will be no-op unless we are\n> reading from the standard input, either with --stdin or --index-info.\n>\n> I actually think we can easily lift the \"must be at the end\" limitation\n> from both codepaths.\n>\n> Move the --stdin codepath to a separate helper like read_index_info(),\n> remove the limitation, and add a new limitation that --stdin/--index-info\n> can be given only once (as the reader will read thru EOF and the second\n> call to the reader won't help us).  And do the reading after processing\n> all the command line stuff (i.e. move read_index_info() call after the\n> option parsing loop), to allow \"update-index --stdin --add hello.c\" to add\n> new paths read from standard input and also hello.c was given from the\n> command line.\n>\n> Wouldn't it make much more sense to spend brain cycles to write and review\n> such a patch, rather than documenting an unnecessary limitation?\n>\n> Hmm?\n\nAs the subject suspects, the main intention was to document that -z\napplies also to --index-info. The reminder is only falloff while\nfixing this inconsistency in the documentation.\n\nSo, yes we should have spend more time to remove this limitation that\nthey need to be the last option.\n\nI will prepare a patch which handles only the -z/--index-info\ndocumentation issue.\n\nBert\n"},{"id":"152951","messageId":"de35ea7e5fe3d3ad9ce184c493dd6022cbf90f92.1286520581.git.bert.wesarg@googlemail.com","threadId":"25380","inReplyTo":"AANLkTimWOWHfLtiP8BkQ8ORMhjiyiAZm7Gn+OmQ2USfT@mail.gmail.com","subject":"[PATCH] Documentation: update-index: -z applies also to --index-info","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-08T06:50:20Z","receivedAt":"2010-10-08T06:50:20Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n Documentation/git-update-index.txt |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt\nindex 74d1d49..26fd8d0 100644 Documentation/git-update-index.txt\n--- a/Documentation/git-update-index.txt\n+++ b/Documentation/git-update-index.txt\n@@ -144,8 +144,8 @@ you will need to handle the situation manually.\n         Report what is being added and removed from index.\n \n -z::\n-\tOnly meaningful with `--stdin`; paths are separated with\n-\tNUL character instead of LF.\n+\tOnly meaningful with `--stdin` or `--index-info`; paths are\n+\tseparated with NUL character instead of LF.\n \n \\--::\n \tDo not interpret any more arguments as options.\n-- \n1.7.1.1067.g5aeb7\n"}]}