Thread: cgit view availabel
After a short time (ahem, several years) of badgering of me my a certain community member, I've finally gotten around to putting up a cgit instance on our git server, to allow for browsing of the git repositories. You can find this at: https://git.postgresql.org/cgit/ or specifically for the postgresql git repo: https://git.postgresql.org/cgit/postgresql.git/ For the time being we're running both this and gitweb, and all the redirects will keep pointing to gitweb, as well as the default redirect if you just go https://git.postgresql.org/. If people prefer it, we can discuss changing that in the future, but let's start with some proper full scale testing to see that it doesn't actually just break for some people :) //Magnus
вс, 17 янв. 2021 г. в 14:48, Magnus Hagander <magnus@hagander.net>:
After a short time (ahem, several years) of badgering of me my a
certain community member, I've finally gotten around to putting up a
cgit instance on our git server, to allow for browsing of the git
repositories. You can find this at:
https://git.postgresql.org/cgit/
or specifically for the postgresql git repo:
https://git.postgresql.org/cgit/postgresql.git/
Looks nice!
First thing I've noted:
First thing I've noted:
Is it possible to make the scheme above work?
Our gitweb (and also github) is using it, so I assume people are quite used to it.
Victor Yegorov
On Sun, Jan 17, 2021 at 5:00 PM Victor Yegorov <vyegorov@gmail.com> wrote: > > вс, 17 янв. 2021 г. в 14:48, Magnus Hagander <magnus@hagander.net>: >> >> After a short time (ahem, several years) of badgering of me my a >> certain community member, I've finally gotten around to putting up a >> cgit instance on our git server, to allow for browsing of the git >> repositories. You can find this at: >> >> https://git.postgresql.org/cgit/ >> >> or specifically for the postgresql git repo: >> >> https://git.postgresql.org/cgit/postgresql.git/ > > > Looks nice! > > First thing I've noted: > > https://git.postgresql.org/cgit/postgresql.git/commit/960869da0803427d14335bba24393f414b476e2c > > silently shows another commit. Where did you get that URL from? And AFAICT, and URL like that in cgit shows the latest commit in the repo, for the path that you entered (which in this case is the hash put int he wrong place). > Is it possible to make the scheme above work? > Our gitweb (and also github) is using it, so I assume people are quite used to it. I guess we could capture a specific "looks like a hash" and redirect that, assuming we would never ever have anything in a path or filename in any of our repositories that looks like a hash. That seems like maybe it's a bit of a broad assumption? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/
вс, 17 янв. 2021 г. в 17:19, Magnus Hagander <magnus@hagander.net>:
> First thing I've noted:
>
> https://git.postgresql.org/cgit/postgresql.git/commit/960869da0803427d14335bba24393f414b476e2c
>
> silently shows another commit.
Where did you get that URL from?
I've made it up manually, comparing cgit and gitweb links.
And AFAICT, and URL like that in cgit shows the latest commit in the
repo, for the path that you entered (which in this case is the hash
put int he wrong place).
Yes, that's what I've noted too.
I guess we could capture a specific "looks like a hash" and redirect
that, assuming we would never ever have anything in a path or filename
in any of our repositories that looks like a hash. That seems like
maybe it's a bit of a broad assumption?
I thought maybe it's possible to rewrite requests in a form:
/cgit/*/commit/*
into
/cgit/*/commit/?id=&
?
Victor Yegorov
On Sun, Jan 17, 2021 at 5:46 PM Victor Yegorov <vyegorov@gmail.com> wrote: > > вс, 17 янв. 2021 г. в 17:19, Magnus Hagander <magnus@hagander.net>: >> >> > First thing I've noted: >> > >> > https://git.postgresql.org/cgit/postgresql.git/commit/960869da0803427d14335bba24393f414b476e2c >> > >> > silently shows another commit. >> >> Where did you get that URL from? > > > I've made it up manually, comparing cgit and gitweb links. > > >> >> And AFAICT, and URL like that in cgit shows the latest commit in the >> repo, for the path that you entered (which in this case is the hash >> put int he wrong place). > > > Yes, that's what I've noted too. > > >> I guess we could capture a specific "looks like a hash" and redirect >> that, assuming we would never ever have anything in a path or filename >> in any of our repositories that looks like a hash. That seems like >> maybe it's a bit of a broad assumption? > > > I thought maybe it's possible to rewrite requests in a form: > > /cgit/*/commit/* > > into > > /cgit/*/commit/?id=& That would break any repository that has a directory called "commit" in it, wouldn't it? That said we might be able to pick it up as a top level entry only, because those subdirs would be expected to be under /tree/*/commit/*. But we could also not do /cgit/<one level>/commit/* -- for example https://git.postgresql.org/cgit/postgresql.git/commit/src/backend/tcop/postgres.c?id=960869da0803427d14335bba24393f414b476e2c is a perfectly valid url to show the part of the patch that affects just this one part of the path. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/
On 01/17/21 08:48, Magnus Hagander wrote: > I've finally gotten around to putting up a > cgit instance on our git server, to allow for browsing of the git > repositories. You can find this at: > > https://git.postgresql.org/cgit/ Interesting! Having never actively compared gitweb and cgit, what are the nicest functional benefits I should be looking for? Regards, -Chap