git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-rev-list.txt: prune options in synopsis
@ 2019-10-05  0:13 Denton Liu
  2019-10-05  9:07 ` Junio C Hamano
  2019-10-11  6:04 ` Jeff King
  0 siblings, 2 replies; 5+ messages in thread
From: Denton Liu @ 2019-10-05  0:13 UTC (permalink / raw)
  To: Git Mailing List

The synopsis section in git-rev-list.txt has grown to be a huge list
that probably needs its own synopsis. Since the list is huge, users may
be given the false impression that the list is complete, however it is
not. It is missing many of the available options.

Since the list of options in the synopsis is not only annoying but
actively harmful, replace it with `[<options>]` so users know to
explicitly look through the documentation for further information.

While we're at it, update the optional path notation so that it is more
modern.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
I initially wrote a patch to document --children in the synopsis
alongside --parents. However, I quickly realised that --children was
only one of many missing options. Other options included:

	--since
	--after
	--until
	--before
	--show-notes
	--all-match
	--invert-grep
	--basic-regexp
	--perl-regexp
	--exclude
	--reflog
	--alternate-refs
	--single-worktree
	--boundary
	--progress
	--simplify-by-decoration
	... stopped checking here

so I decided it wasn't worth it to keep this list around if it's so
incomplete when even the porcelain git-log.txt doesn't carry a huge list
in the synopsis.

I went through and manually checked each option to ensure that there was
a corresponding option in either rev-list-options.txt or
pretty-options.txt so we shouldn't lose any information by deleting this
list.

 Documentation/git-rev-list.txt | 54 +---------------------------------
 1 file changed, 1 insertion(+), 53 deletions(-)

diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index 9392760b25..025c911436 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -9,59 +9,7 @@ git-rev-list - Lists commit objects in reverse chronological order
 SYNOPSIS
 --------
 [verse]
-'git rev-list' [ --max-count=<number> ]
-	     [ --skip=<number> ]
-	     [ --max-age=<timestamp> ]
-	     [ --min-age=<timestamp> ]
-	     [ --sparse ]
-	     [ --merges ]
-	     [ --no-merges ]
-	     [ --min-parents=<number> ]
-	     [ --no-min-parents ]
-	     [ --max-parents=<number> ]
-	     [ --no-max-parents ]
-	     [ --first-parent ]
-	     [ --remove-empty ]
-	     [ --full-history ]
-	     [ --not ]
-	     [ --all ]
-	     [ --branches[=<pattern>] ]
-	     [ --tags[=<pattern>] ]
-	     [ --remotes[=<pattern>] ]
-	     [ --glob=<glob-pattern> ]
-	     [ --ignore-missing ]
-	     [ --stdin ]
-	     [ --quiet ]
-	     [ --topo-order ]
-	     [ --parents ]
-	     [ --timestamp ]
-	     [ --left-right ]
-	     [ --left-only ]
-	     [ --right-only ]
-	     [ --cherry-mark ]
-	     [ --cherry-pick ]
-	     [ --encoding=<encoding> ]
-	     [ --(author|committer|grep)=<pattern> ]
-	     [ --regexp-ignore-case | -i ]
-	     [ --extended-regexp | -E ]
-	     [ --fixed-strings | -F ]
-	     [ --date=<format>]
-	     [ [ --objects | --objects-edge | --objects-edge-aggressive ]
-	       [ --unpacked ]
-	       [ --object-names | --no-object-names ]
-	       [ --filter=<filter-spec> [ --filter-print-omitted ] ] ]
-	     [ --missing=<missing-action> ]
-	     [ --pretty | --header ]
-	     [ --bisect ]
-	     [ --bisect-vars ]
-	     [ --bisect-all ]
-	     [ --merge ]
-	     [ --reverse ]
-	     [ --walk-reflogs ]
-	     [ --no-walk ] [ --do-walk ]
-	     [ --count ]
-	     [ --use-bitmap-index ]
-	     <commit>... [ \-- <paths>... ]
+'git rev-list' [<options>] <commit>... [[--] <path>...]
 
 DESCRIPTION
 -----------
-- 
2.23.0.687.g391267506c


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-rev-list.txt: prune options in synopsis
  2019-10-05  0:13 [PATCH] git-rev-list.txt: prune options in synopsis Denton Liu
@ 2019-10-05  9:07 ` Junio C Hamano
  2019-10-11  6:04 ` Jeff King
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2019-10-05  9:07 UTC (permalink / raw)
  To: Denton Liu; +Cc: Git Mailing List

Denton Liu <liu.denton@gmail.com> writes:

> The synopsis section in git-rev-list.txt has grown to be a huge list
> that probably needs its own synopsis. Since the list is huge, users may
> be given the false impression that the list is complete, however it is
> not. It is missing many of the available options.
>
> Since the list of options in the synopsis is not only annoying but
> actively harmful, replace it with `[<options>]` so users know to
> explicitly look through the documentation for further information.

I am not sure listing only the most often used ones is harmful.  It
indeed is annoying and it is a good idea to shrink it down like this
patch does.

Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-rev-list.txt: prune options in synopsis
  2019-10-05  0:13 [PATCH] git-rev-list.txt: prune options in synopsis Denton Liu
  2019-10-05  9:07 ` Junio C Hamano
@ 2019-10-11  6:04 ` Jeff King
  2019-10-11 16:02   ` Philip Oakley
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff King @ 2019-10-11  6:04 UTC (permalink / raw)
  To: Denton Liu; +Cc: Git Mailing List

On Fri, Oct 04, 2019 at 05:13:08PM -0700, Denton Liu wrote:

> The synopsis section in git-rev-list.txt has grown to be a huge list
> that probably needs its own synopsis. Since the list is huge, users may
> be given the false impression that the list is complete, however it is
> not. It is missing many of the available options.
> 
> Since the list of options in the synopsis is not only annoying but
> actively harmful, replace it with `[<options>]` so users know to
> explicitly look through the documentation for further information.
> 
> While we're at it, update the optional path notation so that it is more
> modern.

Yes, thank you! This has bugged me for a while. I suspect there are
other pages that could use similar treatment, but I don't mind at all
doing it incrementally.

(One of them is git-branch, where I think the synopsis should focus on
showing the major modes and not listing every possible branch-listing
option).

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-rev-list.txt: prune options in synopsis
  2019-10-11  6:04 ` Jeff King
@ 2019-10-11 16:02   ` Philip Oakley
  2019-10-11 16:11     ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Oakley @ 2019-10-11 16:02 UTC (permalink / raw)
  To: Jeff King, Denton Liu; +Cc: Git Mailing List

On 11/10/2019 07:04, Jeff King wrote:
> On Fri, Oct 04, 2019 at 05:13:08PM -0700, Denton Liu wrote:
>
>> The synopsis section in git-rev-list.txt has grown to be a huge list
>> that probably needs its own synopsis. Since the list is huge, users may
>> be given the false impression that the list is complete, however it is
>> not. It is missing many of the available options.
>>
>> Since the list of options in the synopsis is not only annoying but
>> actively harmful, replace it with `[<options>]` so users know to
>> explicitly look through the documentation for further information.
>>
>> While we're at it, update the optional path notation so that it is more
>> modern.
> Yes, thank you! This has bugged me for a while. I suspect there are
> other pages that could use similar treatment, but I don't mind at all
> doing it incrementally.
>
> (One of them is git-branch, where I think the synopsis should focus on
> showing the major modes and not listing every possible branch-listing
> option).
>
> -Peff
I'd agree that simplifying the rev-list page is good.

Another case, of a different style, is that of `git bundle --all` which 
does need mentioning that particular rev-list option as a major usage (I 
couldn't manage to understand the three layers of man page that needed 
reading).

I had proposed a patch many years ago [1] but the feedback wasn't 
positive, though my SO question continues [2] to get votes.

Philip

[1] 
https://public-inbox.org/git/1348010734-664-2-git-send-email-philipoakley@iee.org/
[2] 
https://stackoverflow.com/questions/11792671/how-to-git-bundle-a-complete-repo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-rev-list.txt: prune options in synopsis
  2019-10-11 16:02   ` Philip Oakley
@ 2019-10-11 16:11     ` Jeff King
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff King @ 2019-10-11 16:11 UTC (permalink / raw)
  To: Philip Oakley; +Cc: Denton Liu, Git Mailing List

On Fri, Oct 11, 2019 at 05:02:33PM +0100, Philip Oakley wrote:

> Another case, of a different style, is that of `git bundle --all` which does
> need mentioning that particular rev-list option as a major usage (I couldn't
> manage to understand the three layers of man page that needed reading).
> 
> I had proposed a patch many years ago [1] but the feedback wasn't positive,
> though my SO question continues [2] to get votes.

Yeah, I agree that "git bundle" could be more clear about this. I think
just adding an example like this might help:

  # generate a bundle similar to what "git clone" would produce
  git bundle create file.bundle --branches --tags

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-11 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05  0:13 [PATCH] git-rev-list.txt: prune options in synopsis Denton Liu
2019-10-05  9:07 ` Junio C Hamano
2019-10-11  6:04 ` Jeff King
2019-10-11 16:02   ` Philip Oakley
2019-10-11 16:11     ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).