Skip to contentSkip to conversation

tag: duplicate mention of --contains should mention --no-contains

PATCH In review Ævar Arnfjörð Bjarmason 2 participants 5 messages May 15, 2017 – May 23, 2017 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tag: duplicate mention of --contains should mention --no-contains

Fix a duplicate mention of --contains in the SYNOPSIS to mention --no-contains.

This fixes an error introduced in my commit ac3f5a3468 ("ref-filter:
add --no-contains option to tag/branch/for-each-ref", 2017-03-24).

---
 Documentation/git-tag.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-tag.txt +1 -1
index f8a0b787f4..1eb15afa1c 100644
@@ -12,7 +12,7 @@ SYNOPSIS
 'git tag' [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>]
 	<tagname> [<commit> | <object>]
 'git tag' -d <tagname>...
-'git tag' [-n[<num>]] -l [--contains <commit>] [--contains <commit>]
+'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]
 	[--points-at <object>] [--column[=<options>] | --no-column]
 	[--create-reflog] [--sort=<key>] [--format=<format>]
 	[--[no-]merged [<commit>]] [<pattern>...]
Signature · 1 line
2.11.0
#1 lore raw
Quoted 16 lines · Ævar Arnfjörð Bjarmason

Fix a duplicate mention of --contains in the SYNOPSIS to mention --no-contains.

This fixes an error introduced in my commit ac3f5a3468 ("ref-filter:
add --no-contains option to tag/branch/for-each-ref", 2017-03-24).

---
 Documentation/git-tag.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-tag.txt +0 -0
index f8a0b787f4..1eb15afa1c 100644

Documentation/git-tag.txt SYNOPSIS · line 15

Quoted 5 lines
Documentation/git-tag.txt +1 -1
@@ -12,7 +12,7 @@ SYNOPSIS
 'git tag' [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>]
 	<tagname> [<commit> | <object>]
 'git tag' -d <tagname>...
-'git tag' [-n[<num>]] -l [--contains <commit>] [--contains <commit>]
+'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]

I think

	[--[no-]contains <commit>]

is the usual pattern...

Documentation/git-tag.txt SYNOPSIS · line 18

Quoted 3 lines
Documentation/git-tag.txt +0 -0
 	[--points-at <object>] [--column[=<options>] | --no-column]
 	[--create-reflog] [--sort=<key>] [--format=<format>]
 	[--[no-]merged [<commit>]] [<pattern>...]

... like with --[no-]merged, there.

		M.
#2 lore raw
Quoted 31 lines · Marc Branchaud
Quoted 17 lines · Ævar Arnfjörð Bjarmason

Fix a duplicate mention of --contains in the SYNOPSIS to mention --no-contains.

This fixes an error introduced in my commit ac3f5a3468 ("ref-filter:
add --no-contains option to tag/branch/for-each-ref", 2017-03-24).

---
 Documentation/git-tag.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-tag.txt +0 -0
index f8a0b787f4..1eb15afa1c 100644

Documentation/git-tag.txt SYNOPSIS · line 15

Quoted 5 lines
Documentation/git-tag.txt +1 -1
@@ -12,7 +12,7 @@ SYNOPSIS
 'git tag' [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>]
        <tagname> [<commit> | <object>]
 'git tag' -d <tagname>...
-'git tag' [-n[<num>]] -l [--contains <commit>] [--contains <commit>]
+'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]

I think

        [--[no-]contains <commit>]

is the usual pattern...

Quoted 8 lines

Documentation/git-tag.txt SYNOPSIS · line 18

Quoted 3 lines
Documentation/git-tag.txt +0 -0
        [--points-at <object>] [--column[=<options>] | --no-column]
        [--create-reflog] [--sort=<key>] [--format=<format>]
        [--[no-]merged [<commit>]] [<pattern>...]

... like with --[no-]merged, there.

                M.

Thanks for the feedback, this was discussed earlier in the series and we decided on the current format I'm submitting here.

Saying --[no-]merged is the convention we use for options where the two are mutually exclusive, as is the case with the --[no-]merged options:

    $ git tag --merged v2.12.0 --no-merged v2.13.0
    error: option `no-merged' is incompatible with --merged
    [...]

But in the case of --contains and --no-contains you can provide both:

    $ git tag --contains v2.12.0 --no-contains v2.13.0 'v*'
    v2.12.0
    v2.12.1
    v2.12.2
    v2.12.3
    v2.13.0-rc0
    v2.13.0-rc1
    v2.13.0-rc2

So they don't use that convention, since it would imply that they're mutually exclusive, rather than both being optional.

#3 lore raw
Quoted 63 lines · Ævar Arnfjörð Bjarmason
Quoted 31 lines · Marc Branchaud
Quoted 17 lines · Ævar Arnfjörð Bjarmason

Fix a duplicate mention of --contains in the SYNOPSIS to mention --no-contains.

This fixes an error introduced in my commit ac3f5a3468 ("ref-filter:
add --no-contains option to tag/branch/for-each-ref", 2017-03-24).

---
 Documentation/git-tag.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-tag.txt +0 -0
index f8a0b787f4..1eb15afa1c 100644

Documentation/git-tag.txt SYNOPSIS · line 15

Quoted 5 lines
Documentation/git-tag.txt +1 -1
@@ -12,7 +12,7 @@ SYNOPSIS
 'git tag' [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>]
        <tagname> [<commit> | <object>]
 'git tag' -d <tagname>...
-'git tag' [-n[<num>]] -l [--contains <commit>] [--contains <commit>]
+'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]

I think

        [--[no-]contains <commit>]

is the usual pattern...

Quoted 8 lines

Documentation/git-tag.txt SYNOPSIS · line 18

Quoted 3 lines
Documentation/git-tag.txt +0 -0
        [--points-at <object>] [--column[=<options>] | --no-column]
        [--create-reflog] [--sort=<key>] [--format=<format>]
        [--[no-]merged [<commit>]] [<pattern>...]

... like with --[no-]merged, there.

                M.

Thanks for the feedback, this was discussed earlier in the series and we decided on the current format I'm submitting here.

Saying --[no-]merged is the convention we use for options where the two are mutually exclusive, as is the case with the --[no-]merged options:

    $ git tag --merged v2.12.0 --no-merged v2.13.0
    error: option `no-merged' is incompatible with --merged
    [...]

But in the case of --contains and --no-contains you can provide both:

    $ git tag --contains v2.12.0 --no-contains v2.13.0 'v*'
    v2.12.0
    v2.12.1
    v2.12.2
    v2.12.3
    v2.13.0-rc0
    v2.13.0-rc1
    v2.13.0-rc2
Quoted 2 lines

So they don't use that convention, since it would imply that they're mutually exclusive, rather than both being optional.

Ah, thanks. My mistake!

		M.
#4 lore raw
In reply to Ævar Arnfjörð Bjarmason
Quoted 16 lines · Ævar Arnfjörð Bjarmason

Fix a duplicate mention of --contains in the SYNOPSIS to mention --no-contains.

This fixes an error introduced in my commit ac3f5a3468 ("ref-filter:
add --no-contains option to tag/branch/for-each-ref", 2017-03-24).

---
 Documentation/git-tag.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-tag.txt +0 -0
index f8a0b787f4..1eb15afa1c 100644

Documentation/git-tag.txt SYNOPSIS

Quoted 9 lines
Documentation/git-tag.txt +1 -2
@@ -12,7 +12,7 @@ SYNOPSIS
 'git tag' [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>]
        <tagname> [<commit> | <object>]
 'git tag' -d <tagname>...
-'git tag' [-n[<num>]] -l [--contains <commit>] [--contains <commit>]
+'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]
        [--points-at <object>] [--column[=<options>] | --no-column]
        [--create-reflog] [--sort=<key>] [--format=<format>]
        [--[no-]merged [<commit>]] [<pattern>...]
--

Junio: I think this one's fallen through the cracks, could you please pick this up? It's also something that should be in 2.13.1.