Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2025 15:46:17 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        Tomek CEDRO <tomek@cedro.info>, Gleb Smirnoff <glebius@freebsd.org>,  Dave Cottlehuber <dch@skunkwerks.at>, bob prohaska <fbsd@www.zefox.net>,  Sulev-Madis Silber <freebsd-current-freebsd-org111@ketas.si.pri.ee>,  freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: /usr/src and /usr/ports not git directories ?
Message-ID:  <CANCZdfrftW4Wz9J-x%2BvrveAKnJxLK%2B5JMiuftfgtS4yCAZuohg@mail.gmail.com>
In-Reply-To: <20250123074050.d9e331172e6b2f9dbc8b8dfd@dec.sakura.ne.jp>
References:  <Z4vk3009iSwuzG4K@www.zefox.net> <Z4__B0EQM-ce0qPE@cell.glebi.us> <C509F94C-2AC2-414F-90C0-355C69869D72@ketas.si.pri.ee> <Z5AQ1GcwX_MZw69G@www.zefox.net> <CANCZdfoHUsZusqMg_gWN5mB9P3xByGv_GfELi9Dd63CHto1igw@mail.gmail.com> <3782b90b-850f-4435-8b6d-bdb83753daea@app.fastmail.com> <CANCZdfruU=GR5DFWL7RQA4_yjh2-NHOB669wsOSL1DzZ3Fs7%2BQ@mail.gmail.com> <Z5Ehmzd4tp-Xf8Q8@cell.glebi.us> <CAFYkXj=nwjK%2BBnKg%2B0vkyeMu8XaLErCVe8Xr1g3%2BDOaOpeCBXA@mail.gmail.com> <CANCZdfq%2BTAW7v-1H71HSY=pFuO2FDkzAU04q_O-6SjTBdSFgSg@mail.gmail.com> <20250123074050.d9e331172e6b2f9dbc8b8dfd@dec.sakura.ne.jp>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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>
>

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

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrftW4Wz9J-x%2BvrveAKnJxLK%2B5JMiuftfgtS4yCAZuohg>