Re: cgit: orientation

From: Mark Millard <marklmi_at_yahoo.com>
Date: Wed, 10 Feb 2021 23:10:25 -0800
> On 2021-Feb-10, at 07:46, Rodney W. Grimes <freebsd-rwg at gndrsh.dnsmgr.net> wrote:
> 
>> On Tue, Feb 9, 2021 at 5:52 PM Warner Losh <imp_at_bsdimp.com> wrote:
>> 
>>> 
>>> 
>>> On Tue, Feb 9, 2021 at 5:47 PM Graham Perrin <grahamperrin_at_gmail.com>
>>> wrote:
>>> 
>>>> Given this, for example:
>>>> 
>>>> <
>>>> https://cgit.freebsd.org/src/commit/?id=174a7e578a33c01401e33f9bfcc077fc3155251c&h=stable%2F12
> 
> 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:
> 
> 	commit 174a7e578a33c01401e33f9bfcc077fc3155251c (patch)
> 
> 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=2ac71adb4026c4faade5ac824c6a1b92e2504faf

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.


>>>>> 
>>>> 
>>>> ? 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.
>>> 
>> 
>> 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.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Thu Feb 11 2021 - 06:10:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC