git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git show documentation: no longer refer to git-diff-tree options

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Apr 27, 2008, 11:45 UTC
Message-ID
<20080427114504.GT4012@genesis.frugalware.org>
In-Reply-To
<200804270730.m3R7UTTp011092@mi1.bluebottle.com>

The only git-diff-tree option that makes sense with git-show is '-s', but (from a user's point of view) it has sightly different meaning, since you don't have a --stdin option when using git-show.

This patch removes the reference to git-diff-tree options and adds documentation for '-s', in the context of git-show.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sun, Apr 27, 2008 at 04:29:55PM +0900, nanako3@bluebottle.com wrote:
Show 5 quoted lines
> I do not know if the updated patch is correct either.
>
> Did you try "git show" with the options you have in the new
> "tree-options" file, for example "git show --root HEAD", and checked
> to make sure they make sense?

The initial problem I tried to solve with this patch is to avoid the situation, when you try to figure out what 'git show --foo' does and you can't find that option in man git-show, which is a usability problem, I think.

> I think "git show -s" makes sense as it is easier to type than "git
> log -1" but I do not think any other options you listed makes sense
> with "git show".

I just checked each option one by one and right, I haven't found any other option that could be useful for git-show either. Given that the wording of -s for git-show is quite different, I think it would be easier to just document -s in git-show as well. Like this?

Thanks.
 Documentation/git-show.txt |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index dccf0e2..299b611 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -25,12 +25,6 @@ with \--name-only).
 
 For plain blobs, it shows the plain contents.
 
-The command takes options applicable to the linkgit:git-diff-tree[1] command to
-control how the changes the commit introduces are shown.
-
-This manual page describes only the most frequently used options.
-
-
 OPTIONS
 -------
 <object>::
@@ -38,6 +32,9 @@ OPTIONS
 	For a more complete list of ways to spell object names, see
 	"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
 
+-s::
+	Don't show a textural diff for commits.
+
 include::pretty-options.txt[]
 
 
-- 
1.5.5.1.91.g499fc.dirty
Previous: しらいしななこNext: Junio C Hamano
Message 6 of 11 in “Documentation: move options of git-diff-tree to a separate file.”
  1. 1/2 Documentation: move options of git-diff-tree to a separate file.Miklos Vajna, Apr 26, 2008
  2. 2/2 Documentation: include diff-tree-options in git-show manpage.Miklos Vajna, Apr 26, 2008
  3. Junio C HamanoApr 27, 2008
  4. Documentation: move options of git-diff-tree to a separate file.Miklos Vajna, Apr 27, 2008
  5. しらいしななこApr 27, 2008
  6. git show documentation: no longer refer to git-diff-tree optionsMiklos Vajna, Apr 27, 2008
  7. Junio C HamanoApr 27, 2008
  8. git show documentation: no longer refer to git-diff-tree optionsMiklos Vajna, May 11, 2008
  9. Junio C HamanoMay 12, 2008
  10. Miklos VajnaMay 13, 2008
  11. Miklos VajnaMay 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.