From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Lars Hjemli <hjemli@gmail.com>, Jeff King <peff@peff.net>,
Jiang Xin <worldhello.net@gmail.com>
Subject: Re: [PATCH v2] ref-filter: Add --no-contains option to tag/branch/for-each-ref
Date: Fri, 10 Mar 2017 12:46:24 +0100 [thread overview]
Message-ID: <CACBZZX74fpEzic3Qs0kG5i5pb-up+Ct0cp71beDXaj+BoDcKRQ@mail.gmail.com> (raw)
In-Reply-To: <CAP8UFD3zGTO5RBpX-WE+8KfTa0pv5NcNDtBRVdRVEdGomL_Wfg@mail.gmail.com>
On Thu, Mar 9, 2017 at 9:31 PM, Christian Couder
<christian.couder@gmail.com> wrote:
> On Thu, Mar 9, 2017 at 9:02 PM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> 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 <keyid>] [-f] [-m <msg> | -F <file>]
>> <tagname> [<commit> | <object>]
>> 'git tag' -d <tagname>...
>> -'git tag' [-n[<num>]] -l [--contains <commit>] [--points-at <object>]
>> +'git tag' [-n[<num>]] -l [--[no-]contains <commit>] [--points-at <object>]
>> [--column[=<options>] | --no-column] [--create-reflog] [--sort=<key>]
>> [--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
>> 'git tag' -v [--format=<format>] <tagname>...
>> @@ -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 [<commit>]::
>> + Only list tags which don't contain the specified commit (HEAD if
>> + not secified).
>
> s/secified/specified/
>
>> +
>> --points-at <object>::
>> 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/
Thanks!
FWIW this is the current status of my WIP v3. I noticed a couple of
other issues where --contains was mentioned without --no-contains.
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 4938496194..d9243bf5e4 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -129 +129 @@ This option is only applicable when listing tags
without annotation lines.
- not secified).
+ not specified).
diff --git a/builtin/branch.c b/builtin/branch.c
index e8d534604c..dd96319726 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -553 +553 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
- OPT_WITHOUT(&filter.with_commit, N_("print only
branches that don't contain the commit")),
+ OPT_WITHOUT(&filter.no_commit, N_("print only branches
that don't contain the commit")),
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index b1ae2388e6..a11542c4fd 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -12 +12 @@ static char const * const for_each_ref_usage[] = {
- N_("git for-each-ref [--contains [<object>]]"),
+ N_("git for-each-ref [(--contains | --no-contains) [<object>]]"),
diff --git a/builtin/tag.c b/builtin/tag.c
index d83674e3e6..57289132a9 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -25 +25 @@ static const char * const git_tag_usage[] = {
- N_("git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>]"
+ N_("git tag -l [-n[<num>]] [--[no-]contains <commit>]
[--points-at <object>]"
These last two hunks are going to bust the i18n files for most
languages. Junio/Jiang, in cases like these where I could fix those up
with a search/replace on po/* without knowing the languages in
question (since it's purely changing e.g. --contains to
--[no-]contains), what do you prefer to do, have that as part of this
patch, or do it after the fact through the normal i18n maintenance
process?
next prev parent reply other threads:[~2017-03-10 11:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 20:20 [PATCH] branch & tag: Add a --no-contains option Ævar Arnfjörð Bjarmason
2017-03-08 23:02 ` Junio C Hamano
2017-03-09 10:09 ` Jeff King
2017-03-09 10:41 ` Ævar Arnfjörð Bjarmason
2017-03-09 10:46 ` Jeff King
2017-03-09 12:12 ` Ævar Arnfjörð Bjarmason
2017-03-09 12:51 ` Jeff King
2017-03-09 13:27 ` [PATCH 0/4] fix object flag pollution in "tag --contains" Jeff King
2017-03-09 13:27 ` [PATCH 1/4] ref-filter: move ref_cbdata definition into ref-filter.c Jeff King
2017-03-09 13:28 ` [PATCH 2/4] ref-filter: use contains_result enum consistently Jeff King
2017-03-09 13:29 ` [PATCH 3/4] ref-filter: die on parse_commit errors Jeff King
2017-03-09 13:29 ` [PATCH 4/4] ref-filter: use separate cache for contains_tag_algo Jeff King
2017-03-11 20:01 ` Ævar Arnfjörð Bjarmason
2017-03-11 20:21 ` Ævar Arnfjörð Bjarmason
2017-03-12 11:12 ` Jeff King
2017-03-11 13:06 ` [PATCH 0/4] fix object flag pollution in "tag --contains" Ævar Arnfjörð Bjarmason
2017-03-11 20:18 ` [PATCH v4] ref-filter: Add --no-contains option to tag/branch/for-each-ref Ævar Arnfjörð Bjarmason
2017-03-12 4:44 ` Junio C Hamano
2017-03-12 9:10 ` Ævar Arnfjörð Bjarmason
2017-03-12 17:49 ` Junio C Hamano
2017-03-09 14:52 ` [PATCH] branch & tag: Add a --no-contains option Ævar Arnfjörð Bjarmason
2017-03-09 14:55 ` Jeff King
2017-03-10 11:31 ` Ævar Arnfjörð Bjarmason
2017-03-09 20:02 ` [PATCH v2] ref-filter: Add --no-contains option to tag/branch/for-each-ref Ævar Arnfjörð Bjarmason
2017-03-09 20:31 ` Christian Couder
2017-03-10 11:46 ` Ævar Arnfjörð Bjarmason [this message]
2017-03-10 12:09 ` Ævar Arnfjörð Bjarmason
2017-03-10 20:33 ` [PATCH v3] " Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACBZZX74fpEzic3Qs0kG5i5pb-up+Ct0cp71beDXaj+BoDcKRQ@mail.gmail.com \
--to=avarab@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hjemli@gmail.com \
--cc=peff@peff.net \
--cc=worldhello.net@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).