Re: cgit: orientation

From: Mark Millard <marklmi_at_yahoo.com>
Date: Wed, 10 Feb 2021 13:53:12 -0800
On 2021-Feb-10, at 12:19, Graham Perrin <grahamperrin at gmail.com> wrote:


> On 10/02/2021 15:46, Rodney W. Grimes 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.
>> 
> Thanks, I already tried that. Result: again, 'stable' in the URL and 'stable/12' visible in the page.
> 
> (It was me who originally copied the URL, to demonstrate what can happen if someone else does so.)
> 
> Please check my sanity. Is it true that this particular commit is _not_ in stable/12?

It is in main. My exploration was as follows but the
general behavior is odd to me.

Finding where the commit is from for sure . . .

Using the id in a range search still says main and lists:

Commit message (Expand)	Author	Age	Files	Lines
* 	ZFS: fix assertions with INVARIANTS	Alan Somers	45 hours	1	-0/+2
* 	Revert "SO_RERROR indicates that receive buffer overflows should be handled a...	Alexander V. Chernikov	47 hours	21	-100/+35
* 	hid: bump HID_ITEM_MAXUSAGES to 8	Warner Losh	47 hours	1	-1/+1
* 	Don't check compat.linux.emul_path before loading linux(4)	Edward Tomasz Napierala	47 hours	1	-1/+3
* 	acpi: limit the AMDI0020/AMDI0010 workaround to an option	Warner Losh	47 hours	2	-0/+4
* 	Turn off forgotten multipath debug messages	Alexander V. Chernikov	47 hours	1	-1/+0

Going to https://cgit.freebsd.org/src/log/?h=stable/12 does not list those.

Going to https://cgit.freebsd.org/src/log/?h=stable/13 does not list those.

Going to https://cgit.freebsd.org/src/log/ does list those.

So: main.


Exploring using search to find the commit . . .

If one starts at: https://cgit.freebsd.org/src/ and does a rnage
search for the id of a stable/12 commit the URL ends up being:

https://cgit.freebsd.org/src/log/?qt=range&q=2ac71adb4026c4faade5ac824c6a1b92e2504faf

The upper right ends up showing main , not stable/12 .
The commit message links also do not specify the branch, for
example (copy/pasted):

https://cgit.freebsd.org/src/commit/?id=2ac71adb4026c4faade5ac824c6a1b92e2504faf

The next link is (copy/pasted):

https://cgit.freebsd.org/src/log/?qt=range&q=2ac71adb4026c4faade5ac824c6a1b92e2504faf&ofs=50

Using it again leaves main in the upper right.


It appears that first going to https://cgit.freebsd.org/src/log/?h=stable/12
and using links there or using a stable/12 link that happens to
be on the page for https://cgit.freebsd.org/src/ is required to get the
branch tracking started --and you have to avoid operations like
range search that drop that tracking (in what is explicitly
displayed).

Just having an id and trying to use it is insufficient context
for cgit.freebsd.org to identify branches overall.

(I do not claim that the "?h=stable/12" notation is completely
unique to the purpose. For example the original reports'
"&h=stable%2F12" can be generated. I'll ignore the variable
notation generally, just showing what I did got as text.)


I also explored some what URL's to a stable/12 commit would do

https://cgit.freebsd.org/src/commit/?h=stable/12&id=2ac71adb4026c4faade5ac824c6a1b92e2504faf
vs.
https://cgit.freebsd.org/src/commit/?id=2ac71adb4026c4faade5ac824c6a1b92e2504faf

The one without "?h=stable/12&" indicates main in the upper right
and copy/paste of the commit link shown also does *not* include
"?h=stable/12&" text. Further activity from there continues to
not have the text.

Of course, if one goes back through one of, say,

https://cgit.freebsd.org/src/log/?h=stable/12
or:
https://cgit.freebsd.org/src/

one ends up in a context that supplies the "?h=stable/12&".


Repeating with the one that has "?h=stable/12&" shows stable/12
in the upper right and copy/ptase of the commit link show does
include "?h=stable/12&" text. Further activity from there
continues to have the text.

Of course if one does a range search for the id, the context
is lost.


Summary: if you want do see what branch via cgit.freebsd.org
use you have to use cgit.freebsd.org in very specific ways.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Wed Feb 10 2021 - 20:53:17 UTC

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