From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, sluongng@gmail.com,
Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH] log: add log.excludeDecoration config option
Date: Wed, 15 Apr 2020 10:14:14 -0400 [thread overview]
Message-ID: <707d61f5-02fe-73a9-0719-d7eece4669b4@gmail.com> (raw)
In-Reply-To: <xmqqtv1m7xc5.fsf@gitster.c.googlers.com>
On 4/14/2020 2:10 PM, Junio C Hamano wrote:
> Derrick Stolee <stolee@gmail.com> writes:
>
>>> * Given that we have command line options to specify what patterns
>>> to include as well as to exclude, it feels somewhat asymmetric to
>>> have only the configuration to exclude. Should we also have a
>>> configuration for including?
>>
>> I left the other side out for simplicity and because I didn't know
>> the use case. It seems all refs are included by default.
>
> It is a bit more subtle than that.
>
> Once you have an inclusion pattern, nothing is included by default.
> Only the ones that match an inclusion pattern would be considered.
> When there is no inclusion pattern, we behave as if there is a
> match-all inclusion pattern.
I did a quick check to verify how things currently work with
this diff:
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index b5de449e51..e9c9e59461 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -742,8 +742,24 @@ test_expect_success 'decorate-refs with glob' '
octopus-a (octopus-a)
reach
EOF
+ cat >expect.no-decorate <<-\EOF &&
+ Merge-tag-reach
+ Merge-tags-octopus-a-and-octopus-b
+ seventh
+ octopus-b
+ octopus-a
+ reach
+ EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs="heads/octopus*" >actual &&
+ test_cmp expect.decorate actual &&
+ git log -n6 --decorate=short --pretty="tformat:%f%d" \
+ --decorate-refs-exclude="heads/octopus*" \
+ --decorate-refs="heads/octopus*" >actual &&
+ test_cmp expect.no-decorate actual &&
+ git -c log.excludeDecoration="heads/octopus*" log \
+ -n6 --decorate=short --pretty="tformat:%f%d" \
+ --decorate-refs="heads/octopus*" >actual &&
test_cmp expect.decorate actual
'
This test fails at the last test_cmp with the current
patch.
Note that if we have both --decorate-refs-exclude=X and
--decorate-refs=X, then the exclusion wins. This means that
we will need to split the "configured" exclusions from the
"command-line" exclusions and give them different priority.
But, I believe that if we can get this test to pass, then
we will have the correct inclusion/exclusion logic. I will
get started on this right now.
Thanks,
-Stolee
next prev parent reply other threads:[~2020-04-15 14:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 15:28 [PATCH] log: add log.excludeDecoration config option Derrick Stolee via GitGitGadget
2020-04-13 15:49 ` Taylor Blau
2020-04-14 15:10 ` Derrick Stolee
2020-04-14 15:45 ` Taylor Blau
2020-04-14 16:00 ` Derrick Stolee
2020-04-14 17:19 ` Junio C Hamano
2020-04-14 17:49 ` Derrick Stolee
2020-04-14 18:10 ` Junio C Hamano
2020-04-15 14:14 ` Derrick Stolee [this message]
2020-04-15 15:44 ` [PATCH v2] " Derrick Stolee via GitGitGadget
2020-04-15 16:52 ` Taylor Blau
2020-04-15 17:24 ` Junio C Hamano
2020-04-15 17:29 ` Junio C Hamano
2020-04-16 12:36 ` Derrick Stolee
2020-04-16 12:46 ` Derrick Stolee
2020-04-16 14:15 ` [PATCH v3 0/2] " Derrick Stolee via GitGitGadget
2020-04-16 14:15 ` [PATCH v3 1/2] log-tree: make ref_filter_match() a helper method Derrick Stolee via GitGitGadget
2020-04-16 14:15 ` [PATCH v3 2/2] log: add log.excludeDecoration config option Derrick Stolee via GitGitGadget
2020-04-16 17:49 ` Junio C Hamano
2020-04-16 18:03 ` Junio C Hamano
2020-04-17 1:53 ` Derrick Stolee
2020-04-17 2:01 ` Junio C Hamano
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=707d61f5-02fe-73a9-0719-d7eece4669b4@gmail.com \
--to=stolee@gmail.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=sluongng@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).