From: Simon Tournier <zimon.toutoune@gmail.com>
To: guix-devel@gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Subject: Re: hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts)
Date: Mon, 11 Sep 2023 19:52:34 +0200 [thread overview]
Message-ID: <871qf4ha1p.fsf@gmail.com> (raw)
In-Reply-To: <871qf4ivsr.fsf@gmail.com>
Re,
On Mon, 11 Sep 2023 at 17:17, Simon Tournier <zimon.toutoune@gmail.com> wrote:
> On Mon, 11 Sep 2023 at 16:23, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Note that the patch series adds a hard dependency on Git.
>> This is because the existing ‘git-fetch’ code depends on Git,
>> which is itself motivated by the fact that Git supports
>> shallow clones and libgit2/Guile-Git doesn’t.
[...]
> Personally, I do not have a strong opinion about the Big Plan™. I note
> that the introduction of Git as a hard dependency is a slippery slope
> considering the current state of libgit2. Here, it starts with “git
> clone”, then “git gc” (unsupported by libgit2) is also in the pipes
> (#65720 [1]). And after timing, I am almost sure that many operations
> using Guile-Git will be slower than their plain Git counter-parts. And
> we will start to parse the output of ’git’ plumbing commands. Slippery
> slope for pushing Guile-Git out, no?
For example, having plain Git command with shallow clone would allow to
save resource when cloning the first time the Guix checkout cache.
Compare,
--8<---------------cut here---------------start------------->8---
$ git clone https://git.savannah.gnu.org/git/guix.git guix-full
Cloning into 'guix-full'...
remote: Counting objects: 696917, done.
remote: Compressing objects: 100% (143179/143179), done.
remote: Total 696917 (delta 552872), reused 696909 (delta 552867)
Receiving objects: 100% (696917/696917), 347.14 MiB | 29.31 MiB/s, done.
Resolving deltas: 100% (552872/552872), done.
--8<---------------cut here---------------end--------------->8---
and,
--8<---------------cut here---------------start------------->8---
$ git clone --shallow-since=2019-04-30 https://git.savannah.gnu.org/git/guix.git guix-oldest
Cloning into 'guix-oldest'...
remote: Counting objects: 426879, done.
remote: Compressing objects: 100% (87246/87246), done.
remote: Total 426879 (delta 342111), reused 423970 (delta 339518)
Receiving objects: 100% (426879/426879), 259.75 MiB | 11.26 MiB/s, done.
Resolving deltas: 100% (342111/342111), done.
Checking connectivity: 426863, done.
--8<---------------cut here---------------end--------------->8---
(Here, 2019-04-30 is the date that contains the %oldest-possible-commit
"6298c3ffd9654d3231a6f25390b056483e8f407c" v1.0.)
Well, ’shallow’ probably implies an overload on server side. But that
is far less than the bits it saves: 87.39 MiB (= 347.14 - 259.75). It
saves something like 25% to download, if I read correctly. I let you do
some maths for the improvement you will get. :-)
And there is no integration with Guile-Git, if I read correctly. The
job is done by the procedure ’clone*’ from the module (guix git). This
procedure call the Guile-Git procedure ’clone’ which could drop-in
replaced by (invoke git-command "clone --shallow-since=2019-04-30" …).
Cheers,
simon
next prev parent reply other threads:[~2023-09-11 17:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 15:17 hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts) Simon Tournier
2023-09-11 17:51 ` wolf
2023-09-11 18:26 ` Maxim Cournoyer
2023-09-11 22:48 ` comparing commit-relation using Scheme+libgit2 vs shellout plumbing Git Simon Tournier
2023-09-12 11:07 ` Attila Lendvai
2023-09-14 10:30 ` Ludovic Courtès
2023-09-14 11:56 ` Simon Tournier
2023-09-11 17:52 ` Simon Tournier [this message]
2023-09-11 18:20 ` hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts) Maxim Cournoyer
2023-09-12 9:06 ` Josselin Poiret
2023-09-12 12:56 ` Maxim Cournoyer
2023-09-12 14:08 ` wolf
2023-09-14 10:22 ` Ludovic Courtès
2023-09-14 16:51 ` Ludovic Courtès
2023-09-14 17:28 ` Simon Tournier
2023-09-17 2:16 ` Maxim Cournoyer
2023-09-18 13:56 ` [bug#65866] " Ludovic Courtès
2023-09-18 14:45 ` Simon Tournier
2023-09-19 14:43 ` bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts Ludovic Courtès
2023-09-19 17:09 ` Simon Tournier
2023-09-11 19:35 ` hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts) Vagrant Cascadian
2023-09-11 21:23 ` Csepp
2023-09-12 7:44 ` Simon Tournier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qf4ha1p.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.