[U-Boot-Custodians] git access - move to gitlab?

Tom Rini trini at konsulko.com
Fri Apr 5 20:03:56 UTC 2019


On Tue, Mar 26, 2019 at 11:52:30AM +0100, Wolfgang Denk wrote:
> Dear Tom,
> 
> In message <20190325154727.GJ18421 at bill-the-cat> you wrote:
> > 
> > > Yes, I'm aware of this.  I know that redirecting the URL for cloning
> > > works, so you will still be able to do - say - 
> > > 
> > > 	git clone git://git.denx.de/u-boot-ti.git
> > >  
> > > but I don't think your example will work out of the box.
> > > 
> > > But then, even if we upgrade the git server and switch from the old
> > > gitweg to cgit (for example) this would break.
> > > 
> > > I'm not even sure we should try to invest the efforts for such a
> > > (basically undocumented ?) API.
> >
> > We're getting out of my general area of expertise but shouldn't you be
> > able to tell ngix or similar to rewrite requests for ?p=REPO;... into
> > whatever the form the gitlab view is?
> 
> With sufficient effort this is most probably possible, but then -
> how complete does such suppot have to be?  There are several
> parameters ("p=", "a=", "f=", "h=", "hb=", "s=", "sr=", "st="...).
> If we try to support all parameters with all options this becomes
> more than some simple address rewriting.

OK, so I think we can do things like:
rewrite ^(/?p=u-boot[a-z_]*.git);a=commit;h=([0-9a-f]+) u-boot/$1/commit/$2

Which should catch u-boot.git and any other u-boot-subtree.git asking
for a specific commit and rewrite it to gitlab syntax, assuming /u-boot/
is where we end up residing.  That said, I probably made some simple
mistake in the above since I don't have something semi-handy to test on,
but from that example we should be able to catch and rewrite a few
others (like tree is u-boot/$1/tree/$2 if the rest of the regex above is
right and so forth).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot-custodians/attachments/20190405/2969030d/attachment.sig>


More information about the U-Boot-Custodians mailing list