From: "Ludovic Courtès" <ludo@gnu.org>
To: Sarah Morgensen <iskarian@mgsn.dev>
Cc: Julien Lepiller <julien@lepiller.eu>, jgart <jgart@dismail.de>,
50274@debbugs.gnu.org
Subject: [bug#50274] [PATCH] guix: git: Adds feature to download git repository to the store.
Date: Thu, 30 Sep 2021 22:03:05 +0200 [thread overview]
Message-ID: <871r554yrq.fsf@gnu.org> (raw)
In-Reply-To: <868rzjvope.fsf@mgsn.dev> (Sarah Morgensen's message of "Sat, 25 Sep 2021 23:24:45 -0700")
Hi,
Sarah Morgensen <iskarian@mgsn.dev> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>>> +(define* (download-git-to-store store url commit
>>> + #:optional (name (basename url))
>>> + #:key (log (current-error-port)) recursive?)
>>> + "Download Git repository from URL at COMMIT to STORE, either under NAME or
>>> +URL's basename if omitted. Write progress reports to LOG. RECURSIVE? has the
>>> +same effect as the same-named parameter of 'git-fetch'."
>>
>> Can we use ‘latest-repository-commit’ instead? The difference is that
>> it’ll populate ~/.cache/guix/checkouts, but I think that’s fine.
>>
>> OTOH, if we want to make it easier to support other VCSes, we can choose
>> to not use (guix git) at all and instead use ‘git-fetch’ in (guix
>> git-download), ‘hg-fetch’ in (guix hg-download), etc. This code would
>> go to (guix scripts hash).
>>
>> WDYT?
>
> Would using 'git-fetch' mean that it's already in the store (and
> therefore won't be redownloaded) when it's subsequently used in a
> source? That would be even better than latest-repository-commit!
Yes, you’re right.
> (Presumably --with-commit and friends also use 'git-fetch'?)
No, they use ‘latest-repository-commit’ (via <git-checkout>) because
it’s a case where you can’t use an <origin> because the content hash is
not known in advance (and the commit is also unknown when you use
‘--with-branch’).
Ludo’.
next prev parent reply other threads:[~2021-09-30 20:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 16:39 [bug#50274] [PATCH] guix: git: Adds feature to download git repository to the store jgart via Guix-patches via
2021-08-31 18:50 ` Sarah Morgensen
2021-08-31 22:28 ` Maxime Devos
2021-08-31 19:08 ` Sarah Morgensen
2021-08-31 19:30 ` jgart via Guix-patches via
2021-08-31 20:06 ` jgart via Guix-patches via
2021-09-03 1:37 ` Sarah Morgensen
2021-09-24 12:25 ` Ludovic Courtès
2021-09-26 6:24 ` Sarah Morgensen
2021-09-30 20:03 ` Ludovic Courtès [this message]
2023-08-01 1:21 ` TakeV via Guix-patches via
2023-08-18 17:55 ` Simon Tournier
2023-08-18 21:02 ` TakeV via Guix-patches via
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871r554yrq.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=50274@debbugs.gnu.org \
--cc=iskarian@mgsn.dev \
--cc=jgart@dismail.de \
--cc=julien@lepiller.eu \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).