From: Karthik Nayak Date: Fri, 18 Sep 2015 15:38:42 GMT Subject: Re: [PATCH v17 14/14] tag.c: implement '--merged' and '--no-merged' options Message-ID: In-Reply-To: On Fri, Sep 18, 2015 at 9:00 PM, Matthieu Moy wrote: > Karthik Nayak writes: > >> On Fri, Sep 18, 2015 at 8:49 PM, Matthieu Moy >> wrote: >>> Karthik Nayak writes: >>> >>>> Not sure this is much of a problem with regards to "--[no-]merged" >>>> I mean isn't the square brackets self-explanatory? >>> >>> Well, usually --no-foo means "cancel the effect of --foo", ie. "git >>> command --foo --no-foo" is equivalent to "git command". >>> >>> Here, --no-merged=some-ref does not _cancel_ the effect but introduce a >>> new behavior that was not the default. So it may make sense to explain >>> this more clearly. >> >> maybe we should s/no/not ? makes not sense to me > > It's too late to rename the option without a transition plan (people's > finger and scripts use --no-merged already). > > But that would be a good idea to introduce --not-merged as a synonym to > --no-merged, and deprecate --no-merged (it can remain a deprecated alias > forever if needed, but we should promote --not-merged in the docs). > Either ways, I'll add it to my personal list of TODO. Also having a look around, even the "--contains" option is similarly documented: --contains []:: Only list tags which contain the specified commit (HEAD if not specified). About the issue at hand, we should probably squash this in diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 3803bf7..19ef640 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -14,7 +14,7 @@ SYNOPSIS 'git tag' -d ... 'git tag' [-n[]] -l [--contains ] [--points-at ] [--column[=] | --no-column] [--create-reflog] [--sort=] - [--format=] [--[no-]merged []] [...] + [--format=] [(--merged | --no-merged) []] [...] 'git tag' -v ... DESCRIPTION @@ -165,10 +165,15 @@ This option is only applicable when listing tags without annotation lines. that of linkgit:git-for-each-ref[1]. When unspecified, defaults to `%(refname:short)`. ---[no-]merged []:: - Only list tags whose tips are reachable, or not reachable - if '--no-merged' is used, from the specified commit ('HEAD' - if not specified). +--merged []:: + Only list tags whose tips are reachable from the specified + commit (The `commit` may be omitted if this is the final + argument, in which case it defaults to `HEAD`). + +--no-merged []:: + Only list tags whose tips are not reachable from the specified + commit (The `commit` may be omitted if this is the final + argument, in which case it defaults to `HEAD`). CONFIGURATION ------------- -- Regards, Karthik Nayak