git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johannes Löthberg" <johannes@kyriasis.com>
To: git@vger.kernel.org
Subject: Re: [PATCH v2] upload-pack: Fail if cloning empty namespace
Date: Sat, 20 Jun 2015 23:49:01 +0200	[thread overview]
Message-ID: <20150620214901.GA5520@leeloo.kyriasis.com> (raw)
In-Reply-To: <xmqqmvzujcvb.fsf@gitster.dls.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

On 20/06, Junio C Hamano wrote:
>Junio C Hamano <gitster@pobox.com> writes:
>Let me step back and try again, as I think I am missing some
>existing feature you are using, and that missing piece is preventing
>me from seeing why this is a good idea (by the way, I do not think
>we are doing this exchange in the right thread---the upload-pack
>patch is not about auto-vivifying a new namespace by creating HEAD).
>

Yeah, that's true.

>But if we made some change to the transfer to push-to-receive-pack
>so that this can also create HEAD that points at something, what
>would the user say, instead of that earlier
>
> $ git clone git://site.xz/r
>
>to access this new namespace?  Don't you have to be running another
>instance of a server with GIT_NAMESPACE set to 'b'?  How do you
>arrange that to automagically happen?
>
>Or do your users that clone/fetch do things differnetly from the
>above, and if so what do they do?
>
>How is your server configured to support the access the existing
>namespace 'a', and the new namespace 'b' that is automatically
>created by pointing /usr/share/git/r.git/refs/namespaces/b/HEAD
>to one ref inside that namespace?

If you want to hide the fact that you're using namespaces you'll 
probably have to either run another daemon or use a wrapper script, yes, 
but only if you want to hide it.

However, if you don't want to hide the namespace behind some script the 
users just have to use --namespace or GIT_NAMESPACE, possibly having a 
script that does some access-control magic so that you eg can only push 
to specific namespaces.

Having it be created is especially important when someone might be 
working on the same machine as the repo, where the push won't go through 
eg SSH.

-- 
Sincerely,
  Johannes Löthberg
  PGP Key ID: 0x50FB9B273A9D0BB5
  https://theos.kyriasis.com/~kyrias/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1495 bytes --]

  reply	other threads:[~2015-06-20 21:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 20:15 [PATCH/RFC] upload-pack: Fail if cloning empty namespace Johannes Löthberg
2015-06-12 21:01 ` Junio C Hamano
2015-06-12 22:17 ` [PATCH v2] " Johannes Löthberg
2015-06-12 22:32   ` Johannes Löthberg
2015-06-15 20:49     ` Junio C Hamano
2015-06-20 14:27       ` Johannes Löthberg
2015-06-20 18:06         ` Junio C Hamano
2015-06-20 18:13           ` Johannes Löthberg
2015-06-20 21:20           ` Junio C Hamano
2015-06-20 21:49             ` Johannes Löthberg [this message]
2015-06-21 18:43               ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150620214901.GA5520@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).