Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Perfect day for scrubbing the floor and other exciting things.


comp / comp.unix.bsd.freebsd.misc / Re: using git for FreeBSD programs

SubjectAuthor
o Re: using git for FreeBSD programsChristian Weisgerber

1
Subject: Re: using git for FreeBSD programs
From: Christian Weisgerber
Newsgroups: comp.unix.bsd.freebsd.misc
Date: Sun, 31 Dec 2023 15:00 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: naddy@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Sun, 31 Dec 2023 15:00:53 -0000 (UTC)
Message-ID: <slrnup30h5.178u.naddy@lorvorc.mips.inka.de>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org> <ydfrzouomv.fsf@UBEblock.psr.com>
<yd8r5eut1h.fsf@UBEblock.psr.com>
Injection-Date: Sun, 31 Dec 2023 15:00:53 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="42391"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
View all headers

On 2023-12-28, Winston <wbe@UBEBLOCK.psr.com.invalid> wrote:

> Here's where I'd like advice from those of you who know more about git.
>
> * Do I have to have a local clone of the remote repository to be able to
> obtain the individual parts?

Yes.
The topic already came up for the switch from CVS to Subversion,
because the latter keeps an extra copy of the checkout on disk, and
then again for Subversion to Git, and each time the developer
consensus was "disk space is cheap".

> I'd prefer not have to clone gigabytes worth of the /usr/ports and
> /usr/src repositories just to obtain and build one program or piece.

Well, it's... 1.4G for ports, 1.7G for src. You can mess around
with...

> Doing:
> git clone --sparse --depth 1 --single-branch \
> https://git.freebsd.org/ports.git /usr/ports

.... well, I see you already did.

> ISTM that there ought to be a way to get a copy of a subset directly
> from the remote repository.

There is not. Git is a distributed version control system. A local
clone of the repository is an inherent part of that. Git is not
designed as a source distribution system.

> * Is there some not-too-painful way to do what I'm trying to do: obtain
> enough of just the parts I'm interested in to be able to make local
> changes and build the result against the existing, installed header
> files and libraries? I don't need to be able to upload the changes or
> make commits to the remote repositories (which I'm not authorized to
> do anyway), so part of what git does regarding branches and merging
> isn't relevant.

Actually, if you have local changes, then it makes perfect sense
to commit them to a local branch. Now that is what Git is designed
for. You have local code under version control that you synchronize
from time to time with a remote repository.

The not-too-painful way is to go along with how Git works, not to
fight it at every step. *shrug*

BTW, I highly recommend the Git Book. Chapters 1-3 provide an
excellent introduction to Git and its concepts.
https://git-scm.com/book/en/v2

> As an alternative to git, I tried visiting the FreeBSD repository files
> with a browser.

As somebody else already mentioned, net/gitup is probably what you
are looking for.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

1

rocksolid light 0.9.8
clearnet tor