Downloading specified file through cgit
Graham Perrin
grahamperrin at gmail.com
Sun May 2 11:50:38 UTC 2021
On 02/05/2021 12:33, 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.
For the example above:
<https://cgit.freebsd.org/src/tree/sys/conf/newvers.sh>
To the right, a menu. Select 'range' then enter and seek the hash. Result:
<https://cgit.freebsd.org/src/log/sys/conf/newvers.sh?qt=range&q=ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01>
Whenever a path is unknown, I lean towards GitLab e.g.
<https://gitlab.com/FreeBSD/freebsd-src/-/find_file/main> or the
comparable find file feature in GitHub.
More information about the freebsd-git
mailing list