From: Junio C Hamano <gitster@pobox•com>
To: Lukas Fleischer <lfleischer@lfos•de>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] Allow hideRefs to match refs outside the namespace
Date: Sun, 01 Nov 2015 10:18:37 -0800 [thread overview]
Message-ID: <xmqqy4ehh9c2.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20151101112716.3758.7843@typhoon.lan> (Lukas Fleischer's message of "Sun, 01 Nov 2015 12:27:16 +0100")
Lukas Fleischer <lfleischer@lfos•de> writes:
> Now, this cannot be intended behavior and I do not think this is
> something we want to retain when improving that feature.
Yup, that makes me suspect that namespace support with hiderefs was
done without giving much thought even stronger than before, and the
fact that nobody has brought it up so far suggests it would be much
smaller deal than usual if a fix brings in incompatibilities to
those who use namespaces.
> 1. Define the (current) semantics of hideRefs pattern. It either needs
> to be defined to match full references or stripped references. Both
> definitions are equivalent when Git namespaces are not used.
>
> It probably makes sense to define hideRefs patterns to match stripped
> references.
OK.
> 2. Improve the documentation and describe the hideRefs semantics better.
> 3. Fix the send_ref() code in either receive-pack or upload-pack,
> 4. Improve hideRefs patterns and allow to match both full references and
> 5. Add a note on the change in behavior to the release notes of the
All OK.
> The second thing I noticed is that having syntax for allowing matches
> against both full references and stripped references is extremely handy
> and desirable, even if we would not have to introduce it for backwards
> compatibility. For example, using the syntax Junio described earlier, my
> initial use case could be solved by
>
> receive.hideRefs=^refs/
> receive.hideRefs=!refs/
>
> which means "Hide all references but do not hide references from the
> current namespace." Here, I am assuming that patterns for stripped refs
> never match anything outside the current namespace because those
> patterns become NULL after stripping.
I would instead assume that the presence of ^ (or !^) in front would
signal "do not strip before checking". !refs/ would mean "after
stripping, does it begin with refs/? If so then do not hide it".
But that does not change the conclusion. With ^refs/ that says
"hide everything that matches refs/ before stripping" (i.e. do not
include anything from anywhere), that is overriden by !refs/ that
says "but do not hide anything that matches refs/ after stripping"
(do include everything from my namespace), I'd think that you'd get
your desired behaviour.
Thanks.
prev parent reply other threads:[~2015-11-01 18:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 8:09 [PATCH/RFC] receive-pack: allow for hiding refs outside the namespace Lukas Fleischer
2015-10-26 19:58 ` Junio C Hamano
[not found] ` <20151027053916.3030.8259@typhoon.lan>
[not found] ` <20151027055911.4877.94179@typhoon.lan>
2015-10-27 14:32 ` Lukas Fleischer
2015-10-27 18:18 ` Junio C Hamano
2015-10-28 7:00 ` Lukas Fleischer
2015-10-28 13:42 ` Jeff King
2015-10-28 15:48 ` Junio C Hamano
2015-10-30 21:31 ` Junio C Hamano
2015-10-30 21:46 ` Jeff King
2015-10-31 9:03 ` Lukas Fleischer
2015-10-28 15:42 ` [PATCH] Allow hideRefs to match " Lukas Fleischer
2015-10-28 16:21 ` Junio C Hamano
2015-10-31 8:49 ` Lukas Fleischer
2015-10-31 17:31 ` Junio C Hamano
2015-10-31 23:40 ` Lukas Fleischer
2015-11-01 11:27 ` Lukas Fleischer
2015-11-01 18:18 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqy4ehh9c2.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=lfleischer@lfos$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox