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

Re: git-show documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 4, 2008, 06:42 UTC
Message-ID
<7vr6bdzood.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<4845E6C5.8010000@gmail.com>
Lea Wiemann <lewiemann@gmail.com> writes:
Show 5 quoted lines
> Just in case someone wants to fix it, man git-log lists a --header
> option (by including rev-list-options.txt), but it doesn't actually
> support this option.  Perhaps rev-list-options.txt should be
> copy-and-pasted instead of included so local changes can be made to
> git-log.txt.

We already do conditional partial inclusion of that file, so reusing that mechanism would be the cleanest.

I've looked at the generated files before and after this patch and the differences looked reasonable.

-- >8 --
Documentation: git-log cannot use rev-list specific options

The log family and git-rev-list share the same set of options that come from revision walking machinery, but they both have options unique to them. Notably, --header, --timestamp, --stdin and --quiet apply only to rev-list. Exclude them from the git-log documentation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/rev-list-options.txt |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index dfcef79..05d5abe 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -34,17 +34,21 @@ format, often found in E-mail messages.
 `--date=default` shows timestamps in the original timezone
 (either committer's or author's).
 
+ifdef::git-rev-list[]
 --header::
 
 	Print the contents of the commit in raw-format; each record is
 	separated with a NUL character.
+endif::git-rev-list[]
 
 --parents::
 
 	Print the parents of the commit.
 
+ifdef::git-rev-list[]
 --timestamp::
 	Print the raw commit timestamp.
+endif::git-rev-list[]
 
 --left-right::
 
@@ -206,6 +210,7 @@ endif::git-rev-list[]
 	Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the
 	command line as '<commit>'.
 
+ifdef::git-rev-list[]
 --stdin::
 
 	In addition to the '<commit>' listed on the command
@@ -218,6 +223,7 @@ endif::git-rev-list[]
 	test the exit status to see if a range of objects is fully
 	connected (or not).  It is faster than redirecting stdout
 	to /dev/null as the output does not have to be formatted.
+endif::git-rev-list[]
 
 --cherry-pick::
 
Previous: Miklos Vajna
Message 3 of 3 in “git-show documentation”
  1. Lea WiemannJun 4, 2008
  2. Miklos VajnaJun 4, 2008
  3. Junio C HamanoJun 4, 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.