{"thread":{"id":"34474","subject":"[RFC/PATCH] rev-parse(1): logically group options","startedAt":"2013-07-18T19:07:29Z","lastAt":"2013-07-22T22:30:39Z","messageCount":6,"participants":["John Keeping","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"223679","messageId":"8ab5f3c276e6f623a8056674c9306334efc9fefe.1374174438.git.john@keeping.me.uk","threadId":"34474","inReplyTo":null,"subject":"[RFC/PATCH] rev-parse(1): logically group options","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-07-18T19:07:29Z","receivedAt":"2013-07-18T19:07:29Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"The options section of the git-rev-parse manual page has grown\norganically so that there now does not seem to be much logic behind the\nordering of the options.  It also does not make it clear that certain\noptions must appear first on the command line.\n\nAddress this by reorganising the options into groups with subheadings.\nThe text of option descriptions does not change.\n\nSigned-off-by: John Keeping <john@keeping.me.uk>\n---\n Documentation/git-rev-parse.txt | 104 +++++++++++++++++++++++-----------------\n 1 file changed, 61 insertions(+), 43 deletions(-)\n\ndiff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt\nindex 993903c..fa284b0 100644\n--- a/Documentation/git-rev-parse.txt\n+++ b/Documentation/git-rev-parse.txt\n@@ -24,9 +24,35 @@ distinguish between them.\n \n OPTIONS\n -------\n+\n+Operation Modes\n+~~~~~~~~~~~~~~~\n+\n+Each of these options must appear first on the command line.\n+\n+--local-env-vars::\n+\tList the GIT_* environment variables that are local to the\n+\trepository (e.g. GIT_DIR or GIT_WORK_TREE, but not GIT_EDITOR).\n+\tOnly the names of the variables are listed, not their value,\n+\teven if they are set.\n+\n --parseopt::\n \tUse 'git rev-parse' in option parsing mode (see PARSEOPT section below).\n \n+--resolve-git-dir <path>::\n+\tCheck if <path> is a valid repository or a gitfile that\n+\tpoints at a valid repository, and print the location of the\n+\trepository.  If <path> is a gitfile then the resolved path\n+\tto the real repository is printed.\n+\n+--sq-quote::\n+\tUse 'git rev-parse' in shell quoting mode (see SQ-QUOTE\n+\tsection below). In contrast to the `--sq` option below, this\n+\tmode does only quoting. Nothing else is done to command input.\n+\n+Options for --parseopt\n+~~~~~~~~~~~~~~~~~~~~~~\n+\n --keep-dashdash::\n \tOnly meaningful in `--parseopt` mode. Tells the option parser to echo\n \tout the first `--` met instead of skipping it.\n@@ -36,10 +62,8 @@ OPTIONS\n \tthe first non-option argument.  This can be used to parse sub-commands\n \tthat take options themselves.\n \n---sq-quote::\n-\tUse 'git rev-parse' in shell quoting mode (see SQ-QUOTE\n-\tsection below). In contrast to the `--sq` option below, this\n-\tmode does only quoting. Nothing else is done to command input.\n+Options for Filtering\n+~~~~~~~~~~~~~~~~~~~~~\n \n --revs-only::\n \tDo not output flags and parameters not meant for\n@@ -55,6 +79,9 @@ OPTIONS\n --no-flags::\n \tDo not output flag parameters.\n \n+Options for Output\n+~~~~~~~~~~~~~~~~~~\n+\n --default <arg>::\n \tIf there is no parameter given by the user, use `<arg>`\n \tinstead.\n@@ -110,6 +137,17 @@ can be used.\n \tstrip '{caret}' prefix from the object names that already have\n \tone.\n \n+--abbrev-ref[=(strict|loose)]::\n+\tA non-ambiguous short name of the objects name.\n+\tThe option core.warnAmbiguousRefs is used to select the strict\n+\tabbreviation mode.\n+\n+--short::\n+--short=number::\n+\tInstead of outputting the full SHA-1 values of object names try to\n+\tabbreviate them to a shorter unique name. When no length is specified\n+\t7 is used. The minimum length is 4.\n+\n --symbolic::\n \tUsually the object names are output in SHA-1 form (with\n \tpossible '{caret}' prefix); this option makes them output in a\n@@ -123,16 +161,8 @@ can be used.\n \tunfortunately named tag \"master\"), and show them as full\n \trefnames (e.g. \"refs/heads/master\").\n \n---abbrev-ref[=(strict|loose)]::\n-\tA non-ambiguous short name of the objects name.\n-\tThe option core.warnAmbiguousRefs is used to select the strict\n-\tabbreviation mode.\n-\n---disambiguate=<prefix>::\n-\tShow every object whose name begins with the given prefix.\n-\tThe <prefix> must be at least 4 hexadecimal digits long to\n-\tavoid listing each and every object in the repository by\n-\tmistake.\n+Options for Input\n+~~~~~~~~~~~~~~~~~\n \n --all::\n \tShow all refs found in `refs/`.\n@@ -155,18 +185,11 @@ shown.  If the pattern does not contain a globbing character (`?`,\n \tcharacter (`?`, `*`, or `[`), it is turned into a prefix\n \tmatch by appending `/*`.\n \n---show-toplevel::\n-\tShow the absolute path of the top-level directory.\n-\n---show-prefix::\n-\tWhen the command is invoked from a subdirectory, show the\n-\tpath of the current directory relative to the top-level\n-\tdirectory.\n-\n---show-cdup::\n-\tWhen the command is invoked from a subdirectory, show the\n-\tpath of the top-level directory relative to the current\n-\tdirectory (typically a sequence of \"../\", or an empty string).\n+--disambiguate=<prefix>::\n+\tShow every object whose name begins with the given prefix.\n+\tThe <prefix> must be at least 4 hexadecimal digits long to\n+\tavoid listing each and every object in the repository by\n+\tmistake.\n \n --git-dir::\n \tShow `$GIT_DIR` if defined. Otherwise show the path to\n@@ -177,6 +200,14 @@ If `$GIT_DIR` is not defined and the current directory\n is not detected to lie in a Git repository or work tree\n print a message to stderr and exit with nonzero status.\n \n+--show-toplevel::\n+\tShow the absolute path of the top-level directory.\n+\n+--show-cdup::\n+\tWhen the command is invoked from a subdirectory, show the\n+\tpath of the top-level directory relative to the current\n+\tdirectory (typically a sequence of \"../\", or an empty string).\n+\n --is-inside-git-dir::\n \tWhen the current working directory is below the repository\n \tdirectory print \"true\", otherwise \"false\".\n@@ -188,17 +219,10 @@ print a message to stderr and exit with nonzero status.\n --is-bare-repository::\n \tWhen the repository is bare print \"true\", otherwise \"false\".\n \n---local-env-vars::\n-\tList the GIT_* environment variables that are local to the\n-\trepository (e.g. GIT_DIR or GIT_WORK_TREE, but not GIT_EDITOR).\n-\tOnly the names of the variables are listed, not their value,\n-\teven if they are set.\n-\n---short::\n---short=number::\n-\tInstead of outputting the full SHA-1 values of object names try to\n-\tabbreviate them to a shorter unique name. When no length is specified\n-\t7 is used. The minimum length is 4.\n+--show-prefix::\n+\tWhen the command is invoked from a subdirectory, show the\n+\tpath of the current directory relative to the top-level\n+\tdirectory.\n \n --since=datestring::\n --after=datestring::\n@@ -213,12 +237,6 @@ print a message to stderr and exit with nonzero status.\n <args>...::\n \tFlags and parameters to be parsed.\n \n---resolve-git-dir <path>::\n-\tCheck if <path> is a valid repository or a gitfile that\n-\tpoints at a valid repository, and print the location of the\n-\trepository.  If <path> is a gitfile then the resolved path\n-\tto the real repository is printed.\n-\n \n include::revisions.txt[]\n \n-- \n1.8.3.3.972.gc83849e.dirty\n"},{"id":"223804","messageId":"7v4nbquw3l.fsf@alter.siamese.dyndns.org","threadId":"34474","inReplyTo":"8ab5f3c276e6f623a8056674c9306334efc9fefe.1374174438.git.john@keeping.me.uk","subject":"Re: [RFC/PATCH] rev-parse(1): logically group options","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-19T20:35:10Z","receivedAt":"2013-07-19T20:35:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Keeping <john@keeping.me.uk> writes:\n\n> The options section of the git-rev-parse manual page has grown\n> organically so that there now does not seem to be much logic behind the\n> ordering of the options.  It also does not make it clear that certain\n> options must appear first on the command line.\n>\n> Address this by reorganising the options into groups with subheadings.\n> The text of option descriptions does not change.\n>\n> Signed-off-by: John Keeping <john@keeping.me.uk>\n\nThe idea to introduce a general grouping makes a lot of sense, I think.\n\n> +Operation Modes\n> +~~~~~~~~~~~~~~~\n> +\n> +Each of these options must appear first on the command line.\n> +\n> +--local-env-vars::\n> +\tList the GIT_* environment variables that are local to the\n> +\trepository (e.g. GIT_DIR or GIT_WORK_TREE, but not GIT_EDITOR).\n> +\tOnly the names of the variables are listed, not their value,\n> +\teven if they are set.\n\nHonestly speaking, \"must appear first\" for \"--local-env-vars\" is a\nbug in implementations of this option, I think.  It does not make\nsense to ask\n\n\tgit rev-parse --local-env-vars -- Makefile\n\nand the command operates on \"--\" and \"Makefile\" in the normal\noperation mode, not \"local-env-vars\" mode.\n\n> +\n>  --parseopt::\n>  \tUse 'git rev-parse' in option parsing mode (see PARSEOPT section below).\n>  \n> +--resolve-git-dir <path>::\n> +\tCheck if <path> is a valid repository or a gitfile that\n> +\tpoints at a valid repository, and print the location of the\n> +\trepository.  If <path> is a gitfile then the resolved path\n> +\tto the real repository is printed.\n> +\n> +--sq-quote::\n> +\tUse 'git rev-parse' in shell quoting mode (see SQ-QUOTE\n> +\tsection below). In contrast to the `--sq` option below, this\n> +\tmode does only quoting. Nothing else is done to command input.\n\n> +Options for Input\n> +~~~~~~~~~~~~~~~~~\n>  \n> +--show-toplevel::\n> +\tShow the absolute path of the top-level directory.\n> +\n> +--show-cdup::\n> +\tWhen the command is invoked from a subdirectory, show the\n> +\tpath of the top-level directory relative to the current\n> +\tdirectory (typically a sequence of \"../\", or an empty string).\n> +\n>  --is-inside-git-dir::\n>  \tWhen the current working directory is below the repository\n>  \tdirectory print \"true\", otherwise \"false\".\n> @@ -188,17 +219,10 @@ print a message to stderr and exit with nonzero status.\n>  --is-bare-repository::\n>  \tWhen the repository is bare print \"true\", otherwise \"false\".\n>  \n> +--show-prefix::\n> +\tWhen the command is invoked from a subdirectory, show the\n> +\tpath of the current directory relative to the top-level\n> +\tdirectory.\n\nI am not sure if --show-*, --is-*, and --git-dir belongs to \"options\nfor input\".  They are truly kitchen sink options to ask for various\naspects of the repository and directory, and it may be equally valid\n(or even more valid) to consider them as separate operation modes.\n"},{"id":"223875","messageId":"cover.1374410829.git.john@keeping.me.uk","threadId":"34474","inReplyTo":"7v4nbquw3l.fsf@alter.siamese.dyndns.org","subject":"[PATCH v2 0/2] Improvements to rev-parse option handling","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-07-21T12:49:25Z","receivedAt":"2013-07-21T12:49:25Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"This adds a new patch to remove the restrictions on --local-env-var and\n--resolve-git-dir so that they do not need to appear first on the\ncommand line.\n\nThe other patch is update to reflect this as well as to split up the\ncatch-all \"Options for Input\" subsection a bit.\n\nJohn Keeping (2):\n  rev-parse: remove restrictions on some options\n  rev-parse(1): logically group options\n\n Documentation/git-rev-parse.txt | 104 ++++++++++++++++++++++++----------------\n builtin/rev-parse.c             |  28 +++++------\n 2 files changed, 77 insertions(+), 55 deletions(-)\n\n-- \n1.8.3.3.972.gc83849e.dirty\n"},{"id":"223876","messageId":"f1f8ff52a8b8dc70803bba0eb8fb7f9f82ddfd5b.1374410829.git.john@keeping.me.uk","threadId":"34474","inReplyTo":"cover.1374410829.git.john@keeping.me.uk","subject":"[PATCH v2 1/2] rev-parse: remove restrictions on some options","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-07-21T12:49:26Z","receivedAt":"2013-07-21T12:49:26Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"The \"--local-env-vars\" and \"--resolve-git-dir\" arguments to\ngit-rev-parse are currently only handled if they appear first on the\ncommand line (in the case of \"--local-env-vars\", only if it is the only\nargument).  While it may not make sense to use these options when any\nothers are specified, there is no reason for this restriction and it\nmight confuse users if these arguments appear to be ignored.\n\nThere is no need for any documentation change here as the restrictions\non these options are not documented.\n\nSigned-off-by: John Keeping <john@keeping.me.uk>\n---\n builtin/rev-parse.c | 28 +++++++++++++---------------\n 1 file changed, 13 insertions(+), 15 deletions(-)\n\ndiff --git a/builtin/rev-parse.c b/builtin/rev-parse.c\nindex de894c7..c9aa28f 100644\n--- a/builtin/rev-parse.c\n+++ b/builtin/rev-parse.c\n@@ -486,21 +486,6 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)\n \tif (argc > 1 && !strcmp(\"--sq-quote\", argv[1]))\n \t\treturn cmd_sq_quote(argc - 2, argv + 2);\n \n-\tif (argc == 2 && !strcmp(\"--local-env-vars\", argv[1])) {\n-\t\tint i;\n-\t\tfor (i = 0; local_repo_env[i]; i++)\n-\t\t\tprintf(\"%s\\n\", local_repo_env[i]);\n-\t\treturn 0;\n-\t}\n-\n-\tif (argc > 2 && !strcmp(argv[1], \"--resolve-git-dir\")) {\n-\t\tconst char *gitdir = resolve_gitdir(argv[2]);\n-\t\tif (!gitdir)\n-\t\t\tdie(\"not a gitdir '%s'\", argv[2]);\n-\t\tputs(gitdir);\n-\t\treturn 0;\n-\t}\n-\n \tif (argc > 1 && !strcmp(\"-h\", argv[1]))\n \t\tusage(builtin_rev_parse_usage);\n \n@@ -661,6 +646,12 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)\n \t\t\t\tfor_each_remote_ref(show_reference, NULL);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--local-env-vars\")) {\n+\t\t\t\tint i;\n+\t\t\t\tfor (i = 0; local_repo_env[i]; i++)\n+\t\t\t\t\tprintf(\"%s\\n\", local_repo_env[i]);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strcmp(arg, \"--show-toplevel\")) {\n \t\t\t\tconst char *work_tree = get_git_work_tree();\n \t\t\t\tif (work_tree)\n@@ -711,6 +702,13 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)\n \t\t\t\tprintf(\"%s%s.git\\n\", cwd, len && cwd[len-1] != '/' ? \"/\" : \"\");\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--resolve-git-dir\")) {\n+\t\t\t\tconst char *gitdir = resolve_gitdir(argv[i+1]);\n+\t\t\t\tif (!gitdir)\n+\t\t\t\t\tdie(\"not a gitdir '%s'\", argv[i+1]);\n+\t\t\t\tputs(gitdir);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strcmp(arg, \"--is-inside-git-dir\")) {\n \t\t\t\tprintf(\"%s\\n\", is_inside_git_dir() ? \"true\"\n \t\t\t\t\t\t: \"false\");\n-- \n1.8.3.3.972.gc83849e.dirty\n"},{"id":"223877","messageId":"d708e9253761472a1e675ce6fe46dc02686ad9a9.1374410829.git.john@keeping.me.uk","threadId":"34474","inReplyTo":"cover.1374410829.git.john@keeping.me.uk","subject":"[PATCH v2 2/2] rev-parse(1): logically group options","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-07-21T12:49:27Z","receivedAt":"2013-07-21T12:49:27Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"The options section of the git-rev-parse manual page has grown\norganically so that there now does not seem to be much logic behind the\nordering of the options.  It also does not make it clear that certain\noptions must appear first on the command line.\n\nAddress this by reorganising the options into groups with subheadings.\nThe text of option descriptions does not change.\n\nSigned-off-by: John Keeping <john@keeping.me.uk>\n---\n Documentation/git-rev-parse.txt | 104 ++++++++++++++++++++++++----------------\n 1 file changed, 64 insertions(+), 40 deletions(-)\n\ndiff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt\nindex 993903c..34c55a7 100644\n--- a/Documentation/git-rev-parse.txt\n+++ b/Documentation/git-rev-parse.txt\n@@ -24,9 +24,23 @@ distinguish between them.\n \n OPTIONS\n -------\n+\n+Operation Modes\n+~~~~~~~~~~~~~~~\n+\n+Each of these options must appear first on the command line.\n+\n --parseopt::\n \tUse 'git rev-parse' in option parsing mode (see PARSEOPT section below).\n \n+--sq-quote::\n+\tUse 'git rev-parse' in shell quoting mode (see SQ-QUOTE\n+\tsection below). In contrast to the `--sq` option below, this\n+\tmode does only quoting. Nothing else is done to command input.\n+\n+Options for --parseopt\n+~~~~~~~~~~~~~~~~~~~~~~\n+\n --keep-dashdash::\n \tOnly meaningful in `--parseopt` mode. Tells the option parser to echo\n \tout the first `--` met instead of skipping it.\n@@ -36,10 +50,8 @@ OPTIONS\n \tthe first non-option argument.  This can be used to parse sub-commands\n \tthat take options themselves.\n \n---sq-quote::\n-\tUse 'git rev-parse' in shell quoting mode (see SQ-QUOTE\n-\tsection below). In contrast to the `--sq` option below, this\n-\tmode does only quoting. Nothing else is done to command input.\n+Options for Filtering\n+~~~~~~~~~~~~~~~~~~~~~\n \n --revs-only::\n \tDo not output flags and parameters not meant for\n@@ -55,6 +67,9 @@ OPTIONS\n --no-flags::\n \tDo not output flag parameters.\n \n+Options for Output\n+~~~~~~~~~~~~~~~~~~\n+\n --default <arg>::\n \tIf there is no parameter given by the user, use `<arg>`\n \tinstead.\n@@ -110,6 +125,17 @@ can be used.\n \tstrip '{caret}' prefix from the object names that already have\n \tone.\n \n+--abbrev-ref[=(strict|loose)]::\n+\tA non-ambiguous short name of the objects name.\n+\tThe option core.warnAmbiguousRefs is used to select the strict\n+\tabbreviation mode.\n+\n+--short::\n+--short=number::\n+\tInstead of outputting the full SHA-1 values of object names try to\n+\tabbreviate them to a shorter unique name. When no length is specified\n+\t7 is used. The minimum length is 4.\n+\n --symbolic::\n \tUsually the object names are output in SHA-1 form (with\n \tpossible '{caret}' prefix); this option makes them output in a\n@@ -123,16 +149,8 @@ can be used.\n \tunfortunately named tag \"master\"), and show them as full\n \trefnames (e.g. \"refs/heads/master\").\n \n---abbrev-ref[=(strict|loose)]::\n-\tA non-ambiguous short name of the objects name.\n-\tThe option core.warnAmbiguousRefs is used to select the strict\n-\tabbreviation mode.\n-\n---disambiguate=<prefix>::\n-\tShow every object whose name begins with the given prefix.\n-\tThe <prefix> must be at least 4 hexadecimal digits long to\n-\tavoid listing each and every object in the repository by\n-\tmistake.\n+Options for Objects\n+~~~~~~~~~~~~~~~~~~~\n \n --all::\n \tShow all refs found in `refs/`.\n@@ -155,18 +173,20 @@ shown.  If the pattern does not contain a globbing character (`?`,\n \tcharacter (`?`, `*`, or `[`), it is turned into a prefix\n \tmatch by appending `/*`.\n \n---show-toplevel::\n-\tShow the absolute path of the top-level directory.\n+--disambiguate=<prefix>::\n+\tShow every object whose name begins with the given prefix.\n+\tThe <prefix> must be at least 4 hexadecimal digits long to\n+\tavoid listing each and every object in the repository by\n+\tmistake.\n \n---show-prefix::\n-\tWhen the command is invoked from a subdirectory, show the\n-\tpath of the current directory relative to the top-level\n-\tdirectory.\n+Options for Files\n+~~~~~~~~~~~~~~~~~\n \n---show-cdup::\n-\tWhen the command is invoked from a subdirectory, show the\n-\tpath of the top-level directory relative to the current\n-\tdirectory (typically a sequence of \"../\", or an empty string).\n+--local-env-vars::\n+\tList the GIT_* environment variables that are local to the\n+\trepository (e.g. GIT_DIR or GIT_WORK_TREE, but not GIT_EDITOR).\n+\tOnly the names of the variables are listed, not their value,\n+\teven if they are set.\n \n --git-dir::\n \tShow `$GIT_DIR` if defined. Otherwise show the path to\n@@ -188,17 +208,27 @@ print a message to stderr and exit with nonzero status.\n --is-bare-repository::\n \tWhen the repository is bare print \"true\", otherwise \"false\".\n \n---local-env-vars::\n-\tList the GIT_* environment variables that are local to the\n-\trepository (e.g. GIT_DIR or GIT_WORK_TREE, but not GIT_EDITOR).\n-\tOnly the names of the variables are listed, not their value,\n-\teven if they are set.\n+--resolve-git-dir <path>::\n+\tCheck if <path> is a valid repository or a gitfile that\n+\tpoints at a valid repository, and print the location of the\n+\trepository.  If <path> is a gitfile then the resolved path\n+\tto the real repository is printed.\n \n---short::\n---short=number::\n-\tInstead of outputting the full SHA-1 values of object names try to\n-\tabbreviate them to a shorter unique name. When no length is specified\n-\t7 is used. The minimum length is 4.\n+--show-cdup::\n+\tWhen the command is invoked from a subdirectory, show the\n+\tpath of the top-level directory relative to the current\n+\tdirectory (typically a sequence of \"../\", or an empty string).\n+\n+--show-prefix::\n+\tWhen the command is invoked from a subdirectory, show the\n+\tpath of the current directory relative to the top-level\n+\tdirectory.\n+\n+--show-toplevel::\n+\tShow the absolute path of the top-level directory.\n+\n+Other Options\n+~~~~~~~~~~~~~\n \n --since=datestring::\n --after=datestring::\n@@ -213,12 +243,6 @@ print a message to stderr and exit with nonzero status.\n <args>...::\n \tFlags and parameters to be parsed.\n \n---resolve-git-dir <path>::\n-\tCheck if <path> is a valid repository or a gitfile that\n-\tpoints at a valid repository, and print the location of the\n-\trepository.  If <path> is a gitfile then the resolved path\n-\tto the real repository is printed.\n-\n \n include::revisions.txt[]\n \n-- \n1.8.3.3.972.gc83849e.dirty\n"},{"id":"223947","messageId":"7vehaqb52o.fsf@alter.siamese.dyndns.org","threadId":"34474","inReplyTo":"d708e9253761472a1e675ce6fe46dc02686ad9a9.1374410829.git.john@keeping.me.uk","subject":"Re: [PATCH v2 2/2] rev-parse(1): logically group options","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-22T22:30:39Z","receivedAt":"2013-07-22T22:30:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Keeping <john@keeping.me.uk> writes:\n\n> The options section of the git-rev-parse manual page has grown\n> organically so that there now does not seem to be much logic behind the\n> ordering of the options.  It also does not make it clear that certain\n> options must appear first on the command line.\n>\n> Address this by reorganising the options into groups with subheadings.\n> The text of option descriptions does not change.\n>\n> Signed-off-by: John Keeping <john@keeping.me.uk>\n> ---\n>  Documentation/git-rev-parse.txt | 104 ++++++++++++++++++++++++----------------\n>  1 file changed, 64 insertions(+), 40 deletions(-)\n>\n> diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt\n> index 993903c..34c55a7 100644\n> --- a/Documentation/git-rev-parse.txt\n> +++ b/Documentation/git-rev-parse.txt\n> @@ -24,9 +24,23 @@ distinguish between them.\n>  \n>  OPTIONS\n>  -------\n> +\n> +Operation Modes\n> +~~~~~~~~~~~~~~~\n> +\n> +Each of these options must appear first on the command line.\n> +\n>  --parseopt::\n>  \tUse 'git rev-parse' in option parsing mode (see PARSEOPT section below).\n>  \n> +--sq-quote::\n> +\tUse 'git rev-parse' in shell quoting mode (see SQ-QUOTE\n> +\tsection below). In contrast to the `--sq` option below, this\n> +\tmode does only quoting. Nothing else is done to command input.\n\nMuch nicer ;-)\n\nThe rest also looked good to me.  Thanks.\n"}]}