Re: /usr/src and /usr/ports not git directories ?
- Reply: Tomoaki AOKI : "Re: /usr/src and /usr/ports not git directories ?"
- In reply to: Tomoaki AOKI : "Re: /usr/src and /usr/ports not git directories ?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Jan 2025 22:46:17 UTC
On Wed, Jan 22, 2025 at 3:41 PM Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote: > On Wed, 22 Jan 2025 14:31:56 -0700 > Warner Losh <imp@bsdimp.com> wrote: > > > On Wed, Jan 22, 2025, 2:11 PM Tomek CEDRO <tomek@cedro.info> wrote: > > > > > On Wed, Jan 22, 2025 at 5:49 PM Gleb Smirnoff <glebius@freebsd.org> > wrote: > > > > On Wed, Jan 22, 2025 at 09:30:09AM -0700, Warner Losh wrote: > > > > W> I think what you want is > > > > W> > > > > W> % git clone https://github.com/freebsd/freebsd-src --depth=1 -b > > > releng/14.2 > > > > W> --single-branch fred --bare > > > > W> % cd fred > > > > W> % mkdir .git > > > > W> % mv * .git > > > > W> % git config --local core.bare false > > > > W> > > > > W> This will clone 1 deep into the directory 'fred' and won't > checkout a > > > copy. > > > > W> If > > > > W> we make this a package, it's 325MB, as you say. That can then be > > > extracted > > > > W> and then you can recover the tree with: > > > > W> > > > > W> % git checkout releng/14.2 > > > > W> > > > > W> which could be done with the pkg file when extracting to /usr/src. > > > I've not > > > > W> measured > > > > W> ports. > > > > > > > > I really like this plan. So before checkout .git is 337M and after > > > checkout > > > > it is 975M, which is made by actual sources + .git. > > > > > > > > Let's go forward with shipping this bare clone + optional checkout > for > > > > 15.0-RELEASE. We can ask if user wants to do the checkout, or just > keep > > > > /usr/src/.git during the install process. For upgrades, we will just > > > > write new full /usr/src that includes .git on top of 14.x-RELEASE. > That > > > > will consume +50% more space on upgraded installations. I'm pretty > sure > > > > this is fine for those people who do install /usr/src, they already > ain't > > > > doing a minimal installation. We will also put this in RELNOTES. > > > > > > Very cool, thanks folks! :-) > > > > > > One question, would that imply git in base? :-) > > > > > > > Imply? No. > > > > Warner > > Can it be achieved by net/gitup, which is BSD2CLAUSE licensed? > If yes, is there any plan to pull it into base? > no. Maybe got will work, but these will be in git-native format. > I've never tried it, as I'm not enouch sure it works sanely with local > deep-cloned repo, even on stepping back to normal git. > > Another candidate could be devel/got (Game of Tree), which I've not yet > tried, too. > I think that works with git repos, but with different CLI. > Anyway, having updating tool (as was csup for CVS and svnlite for > Subversion) in base would be nice. IIRC, Subversion had the same > annoyance with git, but cannot recall clearly about how CVS was. > Would have been the same, maybe. > It's really hard to beat git fetch. Warner > > > > -- > > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info > > > > > > -- > Tomoaki AOKI <junchoon@dec.sakura.ne.jp> >