From: "Johannes Löthberg" <johannes@kyriasis.com>
To: git@vger.kernel.org
Subject: Re: [PATCH v2 2/2] t: Add test for cloning from ref namespace
Date: Fri, 5 Jun 2015 18:31:35 +0200 [thread overview]
Message-ID: <20150605163135.GA26503@leeloo.kyriasis.com> (raw)
In-Reply-To: <xmqq7frit9ad.fsf@gitster.dls.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]
On 05/06, Junio C Hamano wrote:
>Johannes Löthberg <johannes@kyriasis.com> writes:
>
>> Hmm, it seems that git-rev-parse doesn't handle GIT_NAMESPACE yet, so
>> can't check it for the namespaced push right now. Not sure if I can
>> fix that myself though.
>
>I do not see a need for rev-parse to pay attention to GIT_NAMESPACE
>at all, though.
>
The ref namespace has its own HEAD, so I'd expect
GIT_NAMESPACE=foo git rev-parse HEAD
to act sensibly
>The destination that accepts the push with the enviornment variable,
>i.e. your ../bare repository after this:
>
>+ git commit -m "commit two"
>+ GIT_NAMESPACE=new_namespace git push ../bare master
>
>must be saving the result somewhere in ../bare/, and that is what
>you want to check (and also no refs are affected outside that
>hierarchy).
>
>So perhaps along the lines of
>
> echo $(git rev-parse master) commit \
> refs/namespaces/new_namespace/refs/heads/master >expect &&
> git -C ../bare for-each-ref refs/namespaces/ >actual &&
> test_cmp expect actual
>
>or something? You would want to also check that other refs are not
>molested, so
>
> (
> echo $(git rev-parse master^) commit \
> refs/heads/master &&
> echo $(git rev-parse master) commit \
> refs/namespaces/new_namespace/refs/heads/master
> ) >expect &&
> git -C ../bare for-each-ref >actual &&
> test_cmp expect actual
>
>might be a more appropriate test.
Sounds okay.
--
Sincerely,
Johannes Löthberg
PGP Key ID: 0x50FB9B273A9D0BB5
https://theos.kyriasis.com/~kyrias/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1495 bytes --]
next prev parent reply other threads:[~2015-06-05 16:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 21:24 [PATCH] receive-pack: Create a HEAD ref for ref namespace Johannes Löthberg
2015-06-05 11:53 ` Johannes Löthberg
2015-06-05 12:55 ` Michael J Gruber
2015-06-05 13:50 ` Johannes Löthberg
2015-06-05 14:10 ` Johannes Löthberg
2015-06-05 14:12 ` [PATCH v2] Fix cloning from " Johannes Löthberg
2015-06-05 14:12 ` [PATCH v2 1/2] receive-pack: Create a HEAD ref for " Johannes Löthberg
2015-06-05 14:12 ` [PATCH v2 2/2] t: Add test for cloning from " Johannes Löthberg
2015-06-05 15:33 ` Junio C Hamano
2015-06-05 16:12 ` Johannes Löthberg
2015-06-05 16:22 ` Junio C Hamano
2015-06-05 16:31 ` Johannes Löthberg [this message]
2015-06-05 16:25 ` Johannes Löthberg
2015-06-05 16:46 ` Junio C Hamano
2015-06-05 17:02 ` [PATCH v3] receive-pack: Create a HEAD ref for " Johannes Löthberg
2015-06-05 17:08 ` Johannes Löthberg
2015-06-05 17:19 ` Junio C Hamano
2015-06-05 17:27 ` Johannes Löthberg
2015-06-05 17:42 ` [PATCH v4] " Johannes Löthberg
2015-06-10 23:39 ` Johannes Löthberg
2015-06-15 20:48 ` Junio C Hamano
2015-06-15 20:59 ` Johannes Löthberg
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=20150605163135.GA26503@leeloo.kyriasis.com \
--to=johannes@kyriasis.com \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).