Downloading specified file through cgit
David Wolfskill
david at catwhisker.org
Sun May 2 12:03:15 UTC 2021
On Sun, May 02, 2021 at 08:33:11PM +0900, Yasuhiro Kimura wrote:
> Hello All,
>
> Assuming that following 4 items are provided, is it possible to
> download corresponding file through cgit?
>
> * Repository (e.g. src)
> * Branch (e.g. main)
> * Commit hash (e.g. ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01)
> * Path of file (e.g. /sys/conf/newvers.sh)
>
> I tried to find it by clicking around links on the web interface of
> cgit.freebsd.org but couldn't find right path.
> ...
I *think* so. Here's what I did:
* Direct a browser to https://cgit.freebsd.org/
* Select "src"
* Near the upper-right corner, there is a window for a "search"
argument; copy/paste the hash there
* Just to the left of that is a selection menu that defaults to "log
msg". Select that; change it to "range"
* Select the "search" button.
* The resulting page should show a list of commit messages, the top one
of which is "newvers.sh: restore reporting branch names". Select that
message (click on it).
* The resulting page should show the sommit message and the diff
(basically, the result from "git show
ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01")
* The page includes at least 3 links to versions of newvers.sh; at least
2 of those are the version at
ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01, and at least one is the prior
version. The one just under the "Diffstat" link and the one shown as
"b/sys/conf/newvers.sh" are at ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01.
Select one of them.
* The resulting page shows:
path: root/sys/conf/newvers.sh
blob: 605e61181decd485fc6ad2bba74f6be99b4920be (plain) (blame)
The "(plain)" and "(blame)" are links. Right-click (button 3) the
"(plain)" link; select "Save link as" and save the file.
* You now have a copy of the file at
ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01.
Peace,
david
--
David H. Wolfskill david at catwhisker.org
"some of the terminology that was used, like 'hugs and kisses,' and 'very
fine people,' is like very different from what I experienced and what my
co-workers experienced on the 6th." - Michael Fanone, DC Metro Police Officer
See https://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-git/attachments/20210502/c9358d35/attachment.sig>
More information about the freebsd-git
mailing list