{"thread":{"id":"40574","subject":"[PATCH] usage: do not insist that standard input must come from a file","startedAt":"2015-10-16T18:27:42Z","lastAt":"2015-10-16T22:58:01Z","messageCount":5,"participants":["Junio C Hamano","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"271828","messageId":"xmqqvba6ekip.fsf@gitster.mtv.corp.google.com","threadId":"40574","inReplyTo":null,"subject":"[PATCH] usage: do not insist that standard input must come from a file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-10-16T18:27:42Z","receivedAt":"2015-10-16T18:27:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The synopsys text and the usage string of subcommands that read list\nof things from the standard input are often shown like this:\n\n\tgit gostak [--distim] < <list-of-doshes>\n\nThis is problematic in a number of ways:\n\n * The way to use these commands is more often to feed them the\n   output from another command, not feed them from a file.\n\n * Manual pages outside Git, commands that operate on the data read\n   from the standard input, e.g \"sort\", \"grep\", \"sed\", etc., are not\n   described with such a \"< redirection-from-file\" in their synopsys\n   text.  Our doing so introduces inconsistency.\n\n * We do not insist on where the output should go, by saying\n\n\tgit gostak [--distim] < <list-of-doshes> > <output>\n\n * As it is our convention to enclose placeholders inside <braket>,\n   the redirection operator followed by a placeholder filename\n   becomes very hard to read, both in the documentation and in the\n   help text.\n\nLet's clean them all up, after making sure that the documentation\nclearly describes the modes that take information from the standard\ninput and what kind of things are expected on the input.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * It is very likely that I missed some commands, as I worked from a\n   list of files that showed hits from this:\n\n    $ perl -e '\n\twhile (<>) {\n\t\tif (/^SYNOPSIS/../^DESCRIPTION/) {\n\t\t\tmy $bra = ($_ =~ y/</</);\n\t\t\tmy $ket = ($_ =~ y/>/>/);\n\t\t\tif ($bra != $ket) {\n\t\t\t\tprint \"$_\\n\";\n\t\t\t}\n\t\t}\n\t}' Documentation/*.txt\n\n   An unrelated tangent, but we may want to turn show-index.c to a\n   built-in (or perhaps deprecate and remove it).\n\n Documentation/git-cat-file.txt          |  2 +-\n Documentation/git-check-attr.txt        |  4 ++--\n Documentation/git-check-ignore.txt      |  2 +-\n Documentation/git-commit-tree.txt       |  2 +-\n Documentation/git-fmt-merge-msg.txt     |  2 +-\n Documentation/git-get-tar-commit-id.txt | 12 +++++++-----\n Documentation/git-hash-object.txt       |  2 +-\n Documentation/git-mktag.txt             |  5 +++--\n Documentation/git-patch-id.txt          |  4 +++-\n Documentation/git-show-index.txt        |  7 ++++---\n Documentation/git-show-ref.txt          |  2 +-\n Documentation/git-stripspace.txt        |  9 +++++----\n Documentation/git-unpack-objects.txt    |  2 +-\n builtin/cat-file.c                      |  2 +-\n builtin/check-attr.c                    |  2 +-\n builtin/check-ignore.c                  |  2 +-\n builtin/commit-tree.c                   |  2 +-\n builtin/get-tar-commit-id.c             |  2 +-\n builtin/hash-object.c                   |  2 +-\n builtin/mktag.c                         |  2 +-\n builtin/patch-id.c                      |  2 +-\n builtin/show-ref.c                      |  2 +-\n builtin/stripspace.c                    |  4 ++--\n builtin/unpack-objects.c                |  2 +-\n show-index.c                            |  2 +-\n 25 files changed, 44 insertions(+), 37 deletions(-)\n\ndiff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt\nindex 3105fc0..eb3d694 100644\n--- a/Documentation/git-cat-file.txt\n+++ b/Documentation/git-cat-file.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git cat-file' (-t [--allow-unknown-type]| -s [--allow-unknown-type]| -e | -p | <type> | --textconv ) <object>\n-'git cat-file' (--batch | --batch-check) [--follow-symlinks] < <list-of-objects>\n+'git cat-file' (--batch | --batch-check) [--follow-symlinks]\n \n DESCRIPTION\n -----------\ndiff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt\nindex 00e2aa2..07aacf2 100644\n--- a/Documentation/git-check-attr.txt\n+++ b/Documentation/git-check-attr.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git check-attr' [-a | --all | attr...] [--] pathname...\n-'git check-attr' --stdin [-z] [-a | --all | attr...] < <list-of-paths>\n+'git check-attr' --stdin [-z] [-a | --all | attr...]\n \n DESCRIPTION\n -----------\n@@ -28,7 +28,7 @@ OPTIONS\n \tConsider `.gitattributes` in the index only, ignoring the working tree.\n \n --stdin::\n-\tRead file names from stdin instead of from the command-line.\n+\tRead pathnames from stdin instead of from the command-line.\n \n -z::\n \tThe output format is modified to be machine-parseable.\ndiff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt\nindex e35cd04..149b166 100644\n--- a/Documentation/git-check-ignore.txt\n+++ b/Documentation/git-check-ignore.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git check-ignore' [options] pathname...\n-'git check-ignore' [options] --stdin < <list-of-paths>\n+'git check-ignore' [options] --stdin\n \n DESCRIPTION\n -----------\ndiff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt\nindex a0b5457..48c33d7 100644\n--- a/Documentation/git-commit-tree.txt\n+++ b/Documentation/git-commit-tree.txt\n@@ -9,7 +9,7 @@ git-commit-tree - Create a new commit object\n SYNOPSIS\n --------\n [verse]\n-'git commit-tree' <tree> [(-p <parent>)...] < changelog\n+'git commit-tree' <tree> [(-p <parent>)...]\n 'git commit-tree' [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n \t\t  [(-F <file>)...] <tree>\n \ndiff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt\nindex 55a9a4b..9be6df3 100644\n--- a/Documentation/git-fmt-merge-msg.txt\n+++ b/Documentation/git-fmt-merge-msg.txt\n@@ -9,7 +9,7 @@ git-fmt-merge-msg - Produce a merge commit message\n SYNOPSIS\n --------\n [verse]\n-'git fmt-merge-msg' [-m <message>] [--log[=<n>] | --no-log] <$GIT_DIR/FETCH_HEAD\n+'git fmt-merge-msg' [-m <message>] [--log[=<n>] | --no-log]\n 'git fmt-merge-msg' [-m <message>] [--log[=<n>] | --no-log] -F <file>\n \n DESCRIPTION\ndiff --git a/Documentation/git-get-tar-commit-id.txt b/Documentation/git-get-tar-commit-id.txt\nindex 1e2a20d..51804b0 100644\n--- a/Documentation/git-get-tar-commit-id.txt\n+++ b/Documentation/git-get-tar-commit-id.txt\n@@ -9,17 +9,19 @@ git-get-tar-commit-id - Extract commit ID from an archive created using git-arch\n SYNOPSIS\n --------\n [verse]\n-'git get-tar-commit-id' < <tarfile>\n+'git get-tar-commit-id'\n \n \n DESCRIPTION\n -----------\n-Acts as a filter, extracting the commit ID stored in archives created by\n-'git archive'.  It reads only the first 1024 bytes of input, thus its\n-runtime is not influenced by the size of <tarfile> very much.\n+\n+Read an archive created by 'git archive' from the standard input and\n+extracts the commit ID stored in it.  It reads only the first 1024\n+bytes of input, thus its runtime is not influenced by the size of\n+the archive very much.\n \n If no commit ID is found, 'git get-tar-commit-id' quietly exists with a\n-return code of 1.  This can happen if <tarfile> had not been created\n+return code of 1.  This can happen if the archive had not been created\n using 'git archive' or if the first parameter of 'git archive' had been\n a tree ID instead of a commit ID or tag.\n \ndiff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt\nindex 0c75f3b..45e5ece 100644\n--- a/Documentation/git-hash-object.txt\n+++ b/Documentation/git-hash-object.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...\n-'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>\n+'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters]\n \n DESCRIPTION\n -----------\ndiff --git a/Documentation/git-mktag.txt b/Documentation/git-mktag.txt\nindex 3ca158b..f4cc202 100644\n--- a/Documentation/git-mktag.txt\n+++ b/Documentation/git-mktag.txt\n@@ -9,7 +9,7 @@ git-mktag - Creates a tag object\n SYNOPSIS\n --------\n [verse]\n-'git mktag' < signature_file\n+'git mktag'\n \n DESCRIPTION\n -----------\n@@ -20,7 +20,8 @@ The output is the new tag's <object> identifier.\n \n Tag Format\n ----------\n-A tag signature file has a very simple fixed format: four lines of\n+A tag signature file, to be fed from the standard input, has a\n+very simple fixed format: four lines of\n \n   object <sha1>\n   type <typename>\ndiff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt\nindex 31efc58..7816479 100644\n--- a/Documentation/git-patch-id.txt\n+++ b/Documentation/git-patch-id.txt\n@@ -8,10 +8,12 @@ git-patch-id - Compute unique ID for a patch\n SYNOPSIS\n --------\n [verse]\n-'git patch-id' [--stable | --unstable] < <patch>\n+'git patch-id' [--stable | --unstable]\n \n DESCRIPTION\n -----------\n+Read a patch from the standard input, and compute the patch ID for it.\n+\n A \"patch ID\" is nothing but a sum of SHA-1 of the file diffs associated with a\n patch, with whitespace and line numbers ignored.  As such, it's \"reasonably\n stable\", but at the same time also reasonably unique, i.e., two patches that\ndiff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt\nindex fbdc8ad..b3e7488 100644\n--- a/Documentation/git-show-index.txt\n+++ b/Documentation/git-show-index.txt\n@@ -9,13 +9,14 @@ git-show-index - Show packed archive index\n SYNOPSIS\n --------\n [verse]\n-'git show-index' < idx-file\n+'git show-index'\n \n \n DESCRIPTION\n -----------\n-Reads given idx file for packed Git archive created with\n-'git pack-objects' command, and dumps its contents.\n+Read an idx file for packed Git archive created with\n+'git pack-objects' command from the standard input, and\n+dump its contents.\n \n The information it outputs is subset of what you can get from\n 'git verify-pack -v'; this command only shows the packfile\ndiff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt\nindex 2a6f89b..2c08b08 100644\n--- a/Documentation/git-show-ref.txt\n+++ b/Documentation/git-show-ref.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n 'git show-ref' [-q|--quiet] [--verify] [--head] [-d|--dereference]\n \t     [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags]\n \t     [--heads] [--] [<pattern>...]\n-'git show-ref' --exclude-existing[=<pattern>] < ref-list\n+'git show-ref' --exclude-existing[=<pattern>]\n \n DESCRIPTION\n -----------\ndiff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt\nindex 60328d5..2438f76 100644\n--- a/Documentation/git-stripspace.txt\n+++ b/Documentation/git-stripspace.txt\n@@ -9,14 +9,15 @@ git-stripspace - Remove unnecessary whitespace\n SYNOPSIS\n --------\n [verse]\n-'git stripspace' [-s | --strip-comments] < input\n-'git stripspace' [-c | --comment-lines] < input\n+'git stripspace' [-s | --strip-comments]\n+'git stripspace' [-c | --comment-lines]\n \n DESCRIPTION\n -----------\n \n-Clean the input in the manner used by Git for text such as commit\n-messages, notes, tags and branch descriptions.\n+Read text, such as commit messages, notes, tags and branch\n+descriptions, from the standard input and clean it in the manner\n+used by Git.\n \n With no arguments, this will:\n \ndiff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt\nindex 07d4329..3e887d1 100644\n--- a/Documentation/git-unpack-objects.txt\n+++ b/Documentation/git-unpack-objects.txt\n@@ -9,7 +9,7 @@ git-unpack-objects - Unpack objects from a packed archive\n SYNOPSIS\n --------\n [verse]\n-'git unpack-objects' [-n] [-q] [-r] [--strict] < <packfile>\n+'git unpack-objects' [-n] [-q] [-r] [--strict]\n \n \n DESCRIPTION\ndiff --git a/builtin/cat-file.c b/builtin/cat-file.c\nindex 07baad1..c0fd8db 100644\n--- a/builtin/cat-file.c\n+++ b/builtin/cat-file.c\n@@ -426,7 +426,7 @@ static int batch_objects(struct batch_options *opt)\n \n static const char * const cat_file_usage[] = {\n \tN_(\"git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>\"),\n-\tN_(\"git cat-file (--batch | --batch-check) [--follow-symlinks] < <list-of-objects>\"),\n+\tN_(\"git cat-file (--batch | --batch-check) [--follow-symlinks]\"),\n \tNULL\n };\n \ndiff --git a/builtin/check-attr.c b/builtin/check-attr.c\nindex 21d2bed..265c9ba 100644\n--- a/builtin/check-attr.c\n+++ b/builtin/check-attr.c\n@@ -9,7 +9,7 @@ static int cached_attrs;\n static int stdin_paths;\n static const char * const check_attr_usage[] = {\n N_(\"git check-attr [-a | --all | <attr>...] [--] <pathname>...\"),\n-N_(\"git check-attr --stdin [-z] [-a | --all | <attr>...] < <list-of-paths>\"),\n+N_(\"git check-attr --stdin [-z] [-a | --all | <attr>...]\"),\n NULL\n };\n \ndiff --git a/builtin/check-ignore.c b/builtin/check-ignore.c\nindex dc8d97c..43f3617 100644\n--- a/builtin/check-ignore.c\n+++ b/builtin/check-ignore.c\n@@ -8,7 +8,7 @@\n static int quiet, verbose, stdin_paths, show_non_matching, no_index;\n static const char * const check_ignore_usage[] = {\n \"git check-ignore [<options>] <pathname>...\",\n-\"git check-ignore [<options>] --stdin < <list-of-paths>\",\n+\"git check-ignore [<options>] --stdin\",\n NULL\n };\n \ndiff --git a/builtin/commit-tree.c b/builtin/commit-tree.c\nindex 25aa2cd..8747c0f 100644\n--- a/builtin/commit-tree.c\n+++ b/builtin/commit-tree.c\n@@ -10,7 +10,7 @@\n #include \"utf8.h\"\n #include \"gpg-interface.h\"\n \n-static const char commit_tree_usage[] = \"git commit-tree [(-p <sha1>)...] [-S[<keyid>]] [-m <message>] [-F <file>] <sha1> <changelog\";\n+static const char commit_tree_usage[] = \"git commit-tree [(-p <sha1>)...] [-S[<keyid>]] [-m <message>] [-F <file>] <sha1>\";\n \n static const char *sign_commit;\n \ndiff --git a/builtin/get-tar-commit-id.c b/builtin/get-tar-commit-id.c\nindex 6f4147a..e21c541 100644\n--- a/builtin/get-tar-commit-id.c\n+++ b/builtin/get-tar-commit-id.c\n@@ -8,7 +8,7 @@\n #include \"quote.h\"\n \n static const char builtin_get_tar_commit_id_usage[] =\n-\"git get-tar-commit-id < <tarfile>\";\n+\"git get-tar-commit-id\";\n \n /* ustar header + extended global header content */\n #define RECORDSIZE\t(512)\ndiff --git a/builtin/hash-object.c b/builtin/hash-object.c\nindex 07fef3c..43b098b 100644\n--- a/builtin/hash-object.c\n+++ b/builtin/hash-object.c\n@@ -78,7 +78,7 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix)\n {\n \tstatic const char * const hash_object_usage[] = {\n \t\tN_(\"git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...\"),\n-\t\tN_(\"git hash-object  --stdin-paths < <list-of-paths>\"),\n+\t\tN_(\"git hash-object  --stdin-paths\"),\n \t\tNULL\n \t};\n \tconst char *type = blob_type;\ndiff --git a/builtin/mktag.c b/builtin/mktag.c\nindex 640ab64..031b750 100644\n--- a/builtin/mktag.c\n+++ b/builtin/mktag.c\n@@ -154,7 +154,7 @@ int cmd_mktag(int argc, const char **argv, const char *prefix)\n \tunsigned char result_sha1[20];\n \n \tif (argc != 1)\n-\t\tusage(\"git mktag < signaturefile\");\n+\t\tusage(\"git mktag\");\n \n \tif (strbuf_read(&buf, 0, 4096) < 0) {\n \t\tdie_errno(\"could not read from stdin\");\ndiff --git a/builtin/patch-id.c b/builtin/patch-id.c\nindex ba34dac..366ce5a 100644\n--- a/builtin/patch-id.c\n+++ b/builtin/patch-id.c\n@@ -165,7 +165,7 @@ static void generate_id_list(int stable)\n \tstrbuf_release(&line_buf);\n }\n \n-static const char patch_id_usage[] = \"git patch-id [--stable | --unstable] < patch\";\n+static const char patch_id_usage[] = \"git patch-id [--stable | --unstable]\";\n \n static int git_patch_id_config(const char *var, const char *value, void *cb)\n {\ndiff --git a/builtin/show-ref.c b/builtin/show-ref.c\nindex 131ef28..264c392 100644\n--- a/builtin/show-ref.c\n+++ b/builtin/show-ref.c\n@@ -8,7 +8,7 @@\n \n static const char * const show_ref_usage[] = {\n \tN_(\"git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]\"),\n-\tN_(\"git show-ref --exclude-existing[=<pattern>] < <ref-list>\"),\n+\tN_(\"git show-ref --exclude-existing[=<pattern>]\"),\n \tNULL\n };\n \ndiff --git a/builtin/stripspace.c b/builtin/stripspace.c\nindex 1259ed7..958567a 100644\n--- a/builtin/stripspace.c\n+++ b/builtin/stripspace.c\n@@ -78,8 +78,8 @@ static void comment_lines(struct strbuf *buf)\n }\n \n static const char *usage_msg = \"\\n\"\n-\"  git stripspace [-s | --strip-comments] < input\\n\"\n-\"  git stripspace [-c | --comment-lines] < input\";\n+\"  git stripspace [-s | --strip-comments]\\n\"\n+\"  git stripspace [-c | --comment-lines]\";\n \n int cmd_stripspace(int argc, const char **argv, const char *prefix)\n {\ndiff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c\nindex 7cc086f..7c3e79c 100644\n--- a/builtin/unpack-objects.c\n+++ b/builtin/unpack-objects.c\n@@ -13,7 +13,7 @@\n #include \"fsck.h\"\n \n static int dry_run, quiet, recover, has_errors, strict;\n-static const char unpack_usage[] = \"git unpack-objects [-n] [-q] [-r] [--strict] < pack-file\";\n+static const char unpack_usage[] = \"git unpack-objects [-n] [-q] [-r] [--strict]\";\n \n /* We always read in 4kB chunks. */\n static unsigned char buffer[4096];\ndiff --git a/show-index.c b/show-index.c\nindex 5a9eed7..d9e4903 100644\n--- a/show-index.c\n+++ b/show-index.c\n@@ -2,7 +2,7 @@\n #include \"pack.h\"\n \n static const char show_index_usage[] =\n-\"git show-index < <packed archive index>\";\n+\"git show-index\";\n \n int main(int argc, char **argv)\n {\n-- \n2.6.1-404-gacc2196\n"},{"id":"271829","messageId":"20151016200452.GA1901@google.com","threadId":"40574","inReplyTo":"xmqqvba6ekip.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] usage: do not insist that standard input must come from a file","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2015-10-16T20:04:52Z","receivedAt":"2015-10-16T20:04:52Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> The synopsys text and the usage string of subcommands that read list\n\nnit: s/synopsys/synopsis/\n\n[...]\n> +++ b/Documentation/git-cat-file.txt\n> @@ -10,7 +10,7 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git cat-file' (-t [--allow-unknown-type]| -s [--allow-unknown-type]| -e | -p | <type> | --textconv ) <object>\n> -'git cat-file' (--batch | --batch-check) [--follow-symlinks] < <list-of-objects>\n> +'git cat-file' (--batch | --batch-check) [--follow-symlinks]\n\nMakes sense.  The BATCH OUTPUT section explains the input format.\n\n[...]\n> +++ b/Documentation/git-check-attr.txt\n> @@ -10,7 +10,7 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git check-attr' [-a | --all | attr...] [--] pathname...\n> -'git check-attr' --stdin [-z] [-a | --all | attr...] < <list-of-paths>\n> +'git check-attr' --stdin [-z] [-a | --all | attr...]\n>\n>  DESCRIPTION\n>  -----------\n> @@ -28,7 +28,7 @@ OPTIONS\n>  \tConsider `.gitattributes` in the index only, ignoring the working tree.\n>\n>  --stdin::\n> -\tRead file names from stdin instead of from the command-line.\n> +\tRead pathnames from stdin instead of from the command-line.\n\nHere I have to read the description of \"-z\" to understand that pathnames\ncome one per line.  How about\n\n\tRead pathnames from stdin, one per line, instead of from the command\n\tline.\n\n?\n\n[...]\n> +++ b/Documentation/git-check-ignore.txt\n> @@ -10,7 +10,7 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git check-ignore' [options] pathname...\n> -'git check-ignore' [options] --stdin < <list-of-paths>\n> +'git check-ignore' [options] --stdin\n\nLikewise.\n\n\tRead pathnames from stdin, one per line, instead of from the command\n\tline.\n\n[...]\n> +++ b/Documentation/git-commit-tree.txt\n> @@ -9,7 +9,7 @@ git-commit-tree - Create a new commit object\n>  SYNOPSIS\n>  --------\n>  [verse]\n> -'git commit-tree' <tree> [(-p <parent>)...] < changelog\n> +'git commit-tree' <tree> [(-p <parent>)...]\n\nThe DESCRIPTION explains the input --- good.\n\n[...]\n> +++ b/Documentation/git-fmt-merge-msg.txt\n> @@ -9,7 +9,7 @@ git-fmt-merge-msg - Produce a merge commit message\n>  SYNOPSIS\n>  --------\n>  [verse]\n> -'git fmt-merge-msg' [-m <message>] [--log[=<n>] | --no-log] <$GIT_DIR/FETCH_HEAD\n> +'git fmt-merge-msg' [-m <message>] [--log[=<n>] | --no-log]\n\nThe input format isn't described anywhere, unless I think of looking\nat the \"-F\" option.  More importantly, the expected usage isn't described\nanywhere.\n\nPerhaps an EXAMPLES section would help?\n\n\tEXAMPLE\n\t-------\n\n\t--\n\t$ git fetch origin master\n\t$ git fmt-merge-msg --log <$GIT_DIR/FETCH_HEAD\n\t--\n\n\tPrint a log message describing a merge of the \"master\" branch from\n\tthe \"origin\" remote.\n\n> --- a/Documentation/git-get-tar-commit-id.txt\n> +++ b/Documentation/git-get-tar-commit-id.txt\n> @@ -9,17 +9,19 @@ git-get-tar-commit-id - Extract commit ID from an archive created using git-arch\n>  SYNOPSIS\n>  --------\n>  [verse]\n> -'git get-tar-commit-id' < <tarfile>\n> +'git get-tar-commit-id'\n\nLooks sensible.\n\n[...]\n> +Read an archive created by 'git archive' from the standard input and\n\nPerhaps 'Reads a tar archive'?  Otherwise I would be tempted to pass in\na zip or tgz file.\n\n[...]\n> +++ b/Documentation/git-hash-object.txt\n> @@ -10,7 +10,7 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...\n> -'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>\n> +'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters]\n\nHas the same ambiguity as the other --stdin option descriptions.\n\n\tRead pathnames from stdin, one per line, instead of from the command\n\tline.\n\n[...]\n> +++ b/Documentation/git-mktag.txt\n> @@ -9,7 +9,7 @@ git-mktag - Creates a tag object\n> -A tag signature file has a very simple fixed format: four lines of\n> +A tag signature file, to be fed from the standard input, has a\n\ns/from the/to this command's/\n\n[...]\n> +++ b/Documentation/git-patch-id.txt\n> @@ -8,10 +8,12 @@ git-patch-id - Compute unique ID for a patch\n[...]\n> +Read a patch from the standard input, and compute the patch ID for it.\n\nPunctuation nit: there shouldn't be a comma before \"and\".\n\n[...]\n> +++ b/Documentation/git-show-index.txt\n> @@ -9,13 +9,14 @@ git-show-index - Show packed archive index\n>  SYNOPSIS\n>  --------\n>  [verse]\n> -'git show-index' < idx-file\n> +'git show-index'\n>  \n>  \n>  DESCRIPTION\n>  -----------\n> -Reads given idx file for packed Git archive created with\n> -'git pack-objects' command, and dumps its contents.\n> +Read an idx file for packed Git archive created with\n> +'git pack-objects' command from the standard input, and\n> +dump its contents.\n\nUnrelated nit: this sounds like it's talking about \"git archive\"\non first reading.  Maybe:\n\n\tReads the idx file generated alongside a Git packfile by\n\t'git pack-objects' and dumps a description of the pack's\n\tcontents.\n\n[...]\n> +++ b/Documentation/git-show-ref.txt\n> @@ -11,7 +11,7 @@ SYNOPSIS\n>  'git show-ref' [-q|--quiet] [--verify] [--head] [-d|--dereference]\n>  \t     [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags]\n>  \t     [--heads] [--] [<pattern>...]\n> -'git show-ref' --exclude-existing[=<pattern>] < ref-list\n> +'git show-ref' --exclude-existing[=<pattern>]\n\nWhat is the input format?\n\nShould there be a --stdin option to allow people to explicitly say they want\nto pass ref names (or patterns?) in stdin?\n\n[...]\n> +++ b/Documentation/git-stripspace.txt\n> +++ b/Documentation/git-unpack-objects.txt\n> +++ b/builtin/cat-file.c\n> +++ b/builtin/check-attr.c\n> +++ b/builtin/check-ignore.c\n> +++ b/builtin/commit-tree.c\n> +++ b/builtin/get-tar-commit-id.c\n> +++ b/builtin/hash-object.c\n> +++ b/builtin/mktag.c\n> +++ b/builtin/patch-id.c\n> +++ b/builtin/show-ref.c\n> +++ b/builtin/stripspace.c\n> +++ b/builtin/unpack-objects.c\n> +++ b/show-index.c\n\nLooks good.\n\nThanks,\nJonathan\n"},{"id":"271830","messageId":"xmqqk2qmefui.fsf@gitster.mtv.corp.google.com","threadId":"40574","inReplyTo":"20151016200452.GA1901@google.com","subject":"Re: [PATCH] usage: do not insist that standard input must come from a file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-10-16T20:08:37Z","receivedAt":"2015-10-16T20:08:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>>  --stdin::\n>> -\tRead file names from stdin instead of from the command-line.\n>> +\tRead pathnames from stdin instead of from the command-line.\n>\n> Here I have to read the description of \"-z\" to understand that pathnames\n> come one per line.  How about\n>\n> \tRead pathnames from stdin, one per line, instead of from the command\n> \tline.\n\nThanks, that would be better (and for all the other one-per-line\ntype of stuff).\n"},{"id":"271842","messageId":"xmqqh9lqcuvk.fsf@gitster.mtv.corp.google.com","threadId":"40574","inReplyTo":"xmqqvba6ekip.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] usage: do not insist that standard input must come from a file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-10-16T22:26:55Z","receivedAt":"2015-10-16T22:26:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here is what I prepared based on your review in an interdiff form.\nA few points to note:\n\n * Stole the \"fmt-merge-msg\" example verbatim ;-)\n\n * The description of \"show-ref --exclude\" mode should be much\n   clearer now.\n\nThanks.\n\ndiff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt\nindex 07aacf2..aa3b2bf 100644\n--- a/Documentation/git-check-attr.txt\n+++ b/Documentation/git-check-attr.txt\n@@ -28,7 +28,8 @@ OPTIONS\n \tConsider `.gitattributes` in the index only, ignoring the working tree.\n \n --stdin::\n-\tRead pathnames from stdin instead of from the command-line.\n+\tRead pathnames from the standard input, one per line,\n+\tinstead of from the command-line.\n \n -z::\n \tThe output format is modified to be machine-parseable.\ndiff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt\nindex 149b166..59531ab 100644\n--- a/Documentation/git-check-ignore.txt\n+++ b/Documentation/git-check-ignore.txt\n@@ -35,7 +35,8 @@ OPTIONS\n \tfor each given pathname.\n \n --stdin::\n-\tRead file names from stdin instead of from the command-line.\n+\tRead pathnames from the standard input, one per line,\n+\tinstead of from the command-line.\n \n -z::\n \tThe output format is modified to be machine-parseable (see\ndiff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt\nindex 9be6df3..6526b17 100644\n--- a/Documentation/git-fmt-merge-msg.txt\n+++ b/Documentation/git-fmt-merge-msg.txt\n@@ -57,6 +57,18 @@ merge.summary::\n \tSynonym to `merge.log`; this is deprecated and will be removed in\n \tthe future.\n \n+EXAMPLE\n+-------\n+\n+--\n+$ git fetch origin master\n+$ git fmt-merge-msg --log <$GIT_DIR/FETCH_HEAD\n+--\n+\n+Print a log message describing a merge of the \"master\" branch from\n+the \"origin\" remote.\n+\n+\n SEE ALSO\n --------\n linkgit:git-merge[1]\ndiff --git a/Documentation/git-get-tar-commit-id.txt b/Documentation/git-get-tar-commit-id.txt\nindex 51804b0..ac44d85 100644\n--- a/Documentation/git-get-tar-commit-id.txt\n+++ b/Documentation/git-get-tar-commit-id.txt\n@@ -15,10 +15,10 @@ SYNOPSIS\n DESCRIPTION\n -----------\n \n-Read an archive created by 'git archive' from the standard input and\n-extracts the commit ID stored in it.  It reads only the first 1024\n-bytes of input, thus its runtime is not influenced by the size of\n-the archive very much.\n+Read a tar archive created by 'git archive' from the standard input\n+and extract the commit ID stored in it.  It reads only the first\n+1024 bytes of input, thus its runtime is not influenced by the size\n+of the tar archive very much.\n \n If no commit ID is found, 'git get-tar-commit-id' quietly exists with a\n return code of 1.  This can happen if the archive had not been created\ndiff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt\nindex 45e5ece..814e744 100644\n--- a/Documentation/git-hash-object.txt\n+++ b/Documentation/git-hash-object.txt\n@@ -35,7 +35,8 @@ OPTIONS\n \tRead the object from standard input instead of from a file.\n \n --stdin-paths::\n-\tRead file names from stdin instead of from the command-line.\n+\tRead file names from the standard input, one per line, instead\n+\tof from the command-line.\n \n --path::\n \tHash object as it were located at the given path. The location of\ndiff --git a/Documentation/git-mktag.txt b/Documentation/git-mktag.txt\nindex f4cc202..fa6a756 100644\n--- a/Documentation/git-mktag.txt\n+++ b/Documentation/git-mktag.txt\n@@ -20,8 +20,8 @@ The output is the new tag's <object> identifier.\n \n Tag Format\n ----------\n-A tag signature file, to be fed from the standard input, has a\n-very simple fixed format: four lines of\n+A tag signature file, to be fed to this command's standard input,\n+has a very simple fixed format: four lines of\n \n   object <sha1>\n   type <typename>\ndiff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt\nindex 7816479..cf71fba 100644\n--- a/Documentation/git-patch-id.txt\n+++ b/Documentation/git-patch-id.txt\n@@ -12,7 +12,7 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n-Read a patch from the standard input, and compute the patch ID for it.\n+Read a patch from the standard input and compute the patch ID for it.\n \n A \"patch ID\" is nothing but a sum of SHA-1 of the file diffs associated with a\n patch, with whitespace and line numbers ignored.  As such, it's \"reasonably\ndiff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt\nindex b3e7488..a8a9509 100644\n--- a/Documentation/git-show-index.txt\n+++ b/Documentation/git-show-index.txt\n@@ -14,7 +14,7 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n-Read an idx file for packed Git archive created with\n+Read the idx file for a Git packfile created with\n 'git pack-objects' command from the standard input, and\n dump its contents.\n \ndiff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt\nindex 2c08b08..7b74340 100644\n--- a/Documentation/git-show-ref.txt\n+++ b/Documentation/git-show-ref.txt\n@@ -23,8 +23,9 @@ particular ref exists.\n \n By default, shows the tags, heads, and remote refs.\n \n-The --exclude-existing form is a filter that does the inverse, it shows the\n-refs from stdin that don't exist in the local repository.\n+The --exclude-existing form is a filter that does the inverse.  It reads\n+refs from stdin, one ref per line, and shows those that don't exist in\n+the local repository.\n \n Use of this utility is encouraged in favor of directly accessing files under\n the `.git` directory.\n"},{"id":"271844","messageId":"20151016225801.GB1901@google.com","threadId":"40574","inReplyTo":"xmqqh9lqcuvk.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] usage: do not insist that standard input must come from a file","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2015-10-16T22:58:01Z","receivedAt":"2015-10-16T22:58:01Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> Here is what I prepared based on your review in an interdiff form.\n\nFor what it's worth,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"}]}