From: Christian Couder Date: Thu, 09 Mar 2017 20:31:51 GMT Subject: Re: [PATCH v2] ref-filter: Add --no-contains option to tag/branch/for-each-ref Message-ID: In-Reply-To: <20170309200243.2203-1-avarab@gmail.com> On Thu, Mar 9, 2017 at 9:02 PM, Ævar Arnfjörð Bjarmason wrote: > > diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt > index 525737a5d8..4938496194 100644 > --- a/Documentation/git-tag.txt > +++ b/Documentation/git-tag.txt > @@ -12,7 +12,7 @@ SYNOPSIS > 'git tag' [-a | -s | -u ] [-f] [-m | -F ] > [ | ] > 'git tag' -d ... > -'git tag' [-n[]] -l [--contains ] [--points-at ] > +'git tag' [-n[]] -l [--[no-]contains ] [--points-at ] > [--column[=] | --no-column] [--create-reflog] [--sort=] > [--format=] [--[no-]merged []] [...] > 'git tag' -v [--format=] ... > @@ -124,6 +124,10 @@ This option is only applicable when listing tags without annotation lines. > Only list tags which contain the specified commit (HEAD if not > specified). > > +--no-contains []:: > + Only list tags which don't contain the specified commit (HEAD if > + not secified). s/secified/specified/ > + > --points-at :: > Only list tags of the given object. > > diff --git a/builtin/branch.c b/builtin/branch.c > index 94f7de7fa5..e8d534604c 100644 > --- a/builtin/branch.c > +++ b/builtin/branch.c > @@ -548,7 +548,9 @@ int cmd_branch(int argc, const char **argv, const char *prefix) > OPT_SET_INT('r', "remotes", &filter.kind, N_("act on remote-tracking branches"), > FILTER_REFS_REMOTES), > OPT_CONTAINS(&filter.with_commit, N_("print only branches that contain the commit")), > + OPT_NO_CONTAINS(&filter.no_commit, N_("print only branches that don't contain the commit")), > OPT_WITH(&filter.with_commit, N_("print only branches that contain the commit")), > + OPT_WITHOUT(&filter.with_commit, N_("print only branches that don't contain the commit")), s/with_commit/no_commit/