From: Andy Wingo <wingo@igalia.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] guix hash: -g hashes a git repository
Date: Tue, 04 Apr 2017 15:57:20 +0200 [thread overview]
Message-ID: <87k2708edb.fsf@igalia.com> (raw)
In-Reply-To: <87o9wcs6qs.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 04 Apr 2017 14:21:47 +0200")
On Tue 04 Apr 2017 14:21, ludo@gnu.org (Ludovic Courtès) writes:
>> +For example:
>> +@example
>> +$ git clone http://example.org/foo.git
>> +$ guix hash -g foo
>> +@end example
>
> In this case -g is equivalent to -rx.
My main use case is when I am in a git checkout that has build products
or other stuff. Then I can "guix hash -g .". Easier than making a temp
dir, clone, hash, then delete.
>> +Or even:
>> +@example
>> +$ guix hash -g http://example.org/foo.git
>> +@end example
>> @end table
>
> This one is indeed simpler. However, one typically needs to get the
> commit id in addition to the hash, so it seems that in practice, most of
> the time, we’d still need to do:
>
> git clone http://…
> cd foo
> git log | head -1
> guix hash -rx .
>
> so we have both the commit id and the content hash.
>
> WDYT?
Could be! Or "git rev-parse HEAD". I'll do that.
Andy
next prev parent reply other threads:[~2017-04-04 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 19:58 [PATCH] guix hash: -g hashes a git repository Andy Wingo
2017-04-04 12:21 ` Ludovic Courtès
2017-04-04 13:57 ` Andy Wingo [this message]
2017-04-05 21:06 ` Ludovic Courtès
2017-04-06 0:49 ` Christopher Allan Webber
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=87k2708edb.fsf@igalia.com \
--to=wingo@igalia.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 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).