Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Feb 2021 11:24:16 +0100
From:      Adriaan de Groot <adridg@freebsd.org>
To:        Graham Perrin <grahamperrin@gmail.com>, freebsd-git@freebsd.org
Cc:        freebsd-current <freebsd-current@freebsd.org>, freebsd-git <freebsd-git@freebsd.org>
Subject:   Re: cgit: orientation
Message-ID:  <2285106.THHZn3L5Ee@beastie.bionicmutton.org>
In-Reply-To: <CANCZdfo=o3gAmGh=WyXZV1G==D2ZKpAmYk8D%2BW_oMxDMoO_fQA@mail.gmail.com>
References:  <d3f6d117-0646-5558-9949-f662c50dde0d@gmail.com> <CANCZdfo=o3gAmGh=WyXZV1G==D2ZKpAmYk8D%2BW_oMxDMoO_fQA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Wednesday, 10 February 2021 01:52:32 CET Warner Losh wrote:
> On Tue, Feb 9, 2021 at 5:47 PM Graham Perrin <grahamperrin@gmail.com> wrote:
> > Given this, for example:
> > 
> > <
> > https://cgit.freebsd.org/src/commit/?id=174a7e578a33c01401e33f9bfcc077fc31
> > 55251c&h=stable%2F12
> > 
> > 
> > – with 'stable' in the URL and 'stable/12' visible in the page – how
> > would a reader know that the commit was to main (not stable/12)?
> > 
> > Is there scope to make improved use of cgit, or is this a limitation of
> > cgit?
> 
> There's a pulldown in the upper right corner that says 'stable/12' though
> it took me a while to find it as my eyes glided over it a couple of times.

cgit, though, is just not a very featureful history browser. It does the bare 
minimum, but phabricator or gitlab give you a much nicer (although in their 
own way slow and/or clunky) history view.

Call me old-school, but

- if you're asking this kind of question, you probably have a checkout already
- if you have a checkout, you probably have git(1) installed,. too
- just use the command-line:
	git branch --contains 174a7e578a
	git branch -r --contains 174a7e578a

The latter tells you what branches all have the named commit in their 
ancestry. You could add a git alias:

	git config --global alias.what-branch "branch -r --contains"

and then you can do

	git what-branch 174a7e578a



Buut, yeah, cgit. If you happen to hit a commit at the tip of a branch, 
there's some decoration but the combination of id and branch in the URL can be 
complete nonsense, e.g.

	https://cgit.freebsd.org/src/commit/?
id=a7c68340584c942792188ad50593d4ef15cc8982&h=releng%2F5.5

will give you Warner's latest ACPI commit for EPYC, from which you can 
conclude it was in 5.5-RELEASE :|

[ade]
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEEhrjttu2OP5apuuy1z93JbxKxkVwFAmAlBdAACgkQz93JbxKx
kVzCyAv9HxSFaX3O4hd5eYXo6jFCN4N0Ts7sIwoyekaiHOEfJZSk6r81Ligavu3Z
JyzcRzgPW694Y53CeuR2StvBdCAEwsbPeuHS0+to9DYPSEqai+xFVbxQ6rmAK0jB
ON3hhM5bXQogOJtuqoUdqKk8mrf+ZmwogJ01v1I+I/jY9Yc4aS0930Z1RFFDgVBh
r6l0pSscw5Nmr+pRA9nfwtXghvqvJNJaBsOkmqqwAeXjYo3JJC2Xyq9cgKaznrz7
QQyxXJKuJiw5rwPsQ+oqxAdK1VOH4BQgPTYpVJsy2Hx6ZMRLl/8fmWmGaBYEKK3y
aIUa0nTsEyKZYy0bh+pZHdw/XRpNJ6zm09l0cJLwwB/Q2uq1ALN0xU1sZGSJUZty
lUCglein0Wne8ILomJ8aWC3s8nDyJ0dTMv11jCpsVojWNz9ryIfkn8oR6lG+2X1E
EPA3QhwNEBLUM+DKDX1gWGiOrrw2Q9BQ0cu6Z+JRnJun7ft0+qKv/CfYxMsFCjSq
leO+iROz
=2V5B
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2285106.THHZn3L5Ee>