Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 2021 23:10:25 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
Cc:        Warner Losh <imp@bsdimp.com>, freebsd-git <freebsd-git@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: cgit: orientation
Message-ID:  <E3F9105E-4670-4994-AE7B-1CFC009C1463@yahoo.com>
In-Reply-To: <202102101546.11AFkOMO060587@gndrsh.dnsmgr.net>
References:  <202102101546.11AFkOMO060587@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 2021-Feb-10, at 07:46, Rodney W. Grimes <freebsd-rwg at =
gndrsh.dnsmgr.net> wrote:
>=20
>> On Tue, Feb 9, 2021 at 5:52 PM Warner Losh <imp@bsdimp.com> wrote:
>>=20
>>>=20
>>>=20
>>> On Tue, Feb 9, 2021 at 5:47 PM Graham Perrin =
<grahamperrin@gmail.com>
>>> wrote:
>>>=20
>>>> Given this, for example:
>>>>=20
>>>> <
>>>> =
https://cgit.freebsd.org/src/commit/?id=3D174a7e578a33c01401e33f9bfcc077fc=
3155251c&h=3Dstable%2F12
>=20
> This link probably came from someone copying it out of the address bar
> from some browswer, the better way to get a link out of a cgit page
> is to copy it from the commit: hash line that looks like:
>=20
> 	commit 174a7e578a33c01401e33f9bfcc077fc3155251c (patch)
>=20
> Right click on the hash and select copy link location.

Unfortunately, it turns out to not be that simple. For
example, starting from the page for:

https://cgit.freebsd.org/src/

Try a range search for: 2ac71adb4026c4faade5ac824c6a1b92e2504faf

(which is from stable/12). Then click on the link in the
line on the resultant page:

* 	readelf: decode LA48 and ASG_DISABLE feature flags	Ed Maste	=
28 hours	1	-0/+2

Then copy the link in the line of the type that you reference:

commit	2ac71adb4026c4faade5ac824c6a1b92e2504faf (patch)

Result? No indication of which branch:

=
https://cgit.freebsd.org/src/commit/?id=3D2ac71adb4026c4faade5ac824c6a1b92=
e2504faf

Using the link does not change anything for what
is shown in the upper right.

All the steps reported "main" in the upper right.

What happens depends on which path through got you to
that point. Some places do generate URLs that have
branch references. Other places do not. Some places
preserve branch references in a URL. But some
activities do not.


>>>>>=20
>>>>=20
>>>> ? 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)?
>>>>=20
>>>> Is there scope to make improved use of cgit, or is this a =
limitation of
>>>> cgit?
>>>>=20
>>>=20
>>> 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.
>>>=20
>>=20
>> But that is due to the stable%2F12 in the URL... W/o it, it's no =
good.
>                                                                ^^ =
extra word?
> I think you meant to say "It is good".

I expect Warner was referring to with "no good" was it saying
"main" in the upper right when what was being looked at was
from stable/12 after it was branched (or some other such
mis-matched example) and that he was indicating that the
mismatches are misleading, especially if one does not know to
expect them.

Part of the issue is that nothing else on the commit page
indicates which branch(es) the commit is on, so it is easy
to read too much into the only branch name shown.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E3F9105E-4670-4994-AE7B-1CFC009C1463>