From 33e8fc87407505c3a96792fc47189d57b97b34c3 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 16 Oct 2015 11:27:42 -0700 Subject: usage: do not insist that standard input must come from a file The synopsys text and the usage string of subcommands that read list of things from the standard input are often shown like this: git gostak [--distim] < This is problematic in a number of ways: * The way to use these commands is more often to feed them the output from another command, not feed them from a file. * Manual pages outside Git, commands that operate on the data read from the standard input, e.g "sort", "grep", "sed", etc., are not described with such a "< redirection-from-file" in their synopsys text. Our doing so introduces inconsistency. * We do not insist on where the output should go, by saying git gostak [--distim] < > * As it is our convention to enclose placeholders inside , the redirection operator followed by a placeholder filename becomes very hard to read, both in the documentation and in the help text. Let's clean them all up, after making sure that the documentation clearly describes the modes that take information from the standard input and what kind of things are expected on the input. [jc: stole example for fmt-merge-msg from Jonathan] Helped-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-show-index.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Documentation/git-show-index.txt') diff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt index fbdc8adae5..a8a9509e0e 100644 --- a/Documentation/git-show-index.txt +++ b/Documentation/git-show-index.txt @@ -9,13 +9,14 @@ git-show-index - Show packed archive index SYNOPSIS -------- [verse] -'git show-index' < idx-file +'git show-index' DESCRIPTION ----------- -Reads given idx file for packed Git archive created with -'git pack-objects' command, and dumps its contents. +Read the idx file for a Git packfile created with +'git pack-objects' command from the standard input, and +dump its contents. The information it outputs is subset of what you can get from 'git verify-pack -v'; this command only shows the packfile -- cgit v1.2.3