List for cgit developers and users
 help / color / mirror / Atom feed
From: richard.maw at gmail.com (Richard Maw)
Subject: Supporting Namespaces in cgit
Date: Sun, 26 Jun 2016 01:44:03 +0100	[thread overview]
Message-ID: <20160626004403.GB18731@surtur-linux> (raw)
In-Reply-To: <20160625154626.GA18731@surtur-linux>

On Sat, Jun 25, 2016 at 04:46:26PM +0100, Richard Maw wrote:
> On Tue, May 10, 2016 at 02:21:36PM +0100, John Keeping wrote:
> > On Mon, May 09, 2016 at 10:54:44PM +0100, Daniel Silverstone wrote:
> > > On Mon, May 09, 2016 at 22:31:37 +0100, John Keeping wrote:
> > > > Implementation-wise, it looks like using a namespace should just be a
> > > > matter of setting GIT_NAMESPACE in the environment near the top of
> > > > cgit.c::prepare_repo_cmd().
> > > 
> > > This is certainly the basic starting point.
> > > 
> > > > Discovering namespaces is more interesting, since we can't know what
> > > > exactly is a namespace.  For example, if we have:
> > > > 
> > > > 	refs/namespaces/foo/bar/baz
> > > > 
> > > > is the namespace "foo" or "foo/bar"?  Maybe checking for "heads" and
> > > > "tags" subdirectories is enough, but I'm not familiar enough with
> > > > namespaces to know if those will definitely exist, and obviously users
> > > > can create or delete any directories anywhere in the hierarchy.
> 
> Having looked at it in more detail,
> I'd check for the presence of a HEAD symbolic ref,
> if we were going to try it.

It turns out that symbolic refs don't get packed,
so it's always file system traversal rather than packed ref reading.

However, HEAD symbolic refs in namespaces don't get automatically created,
but they are needed to clone with the dumb-http transport.

This is mostly just an annoying extra step to using namespaces,
though it might be worth trying repo.defbranch in the absence of a HEAD file.


      reply	other threads:[~2016-06-26  0:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09 20:34 dsilvers
2016-05-09 21:31 ` john
2016-05-09 21:54   ` dsilvers
2016-05-10 13:21     ` john
2016-06-25 15:46       ` richard.maw
2016-06-26  0:44         ` richard.maw [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=20160626004403.GB18731@surtur-linux \
    --to=cgit@lists.zx2c4.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.
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).