[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] guix hash: -g hashes a git repository
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] guix hash: -g hashes a git repository |
Date: |
Tue, 04 Apr 2017 14:21:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hello!
Andy Wingo <address@hidden> skribis:
> * guix/scripts/hash.scm (show-help, %options): Add -g option.
> (guix-hash): Support hashing of Git URLs.
> * doc/guix.texi (Invoking guix hash): Document guix hash --git.
[...]
> +For example:
> address@hidden
> +$ git clone http://example.org/foo.git
> +$ guix hash -g foo
> address@hidden example
In this case -g is equivalent to -rx.
> +Or even:
> address@hidden
> +$ guix hash -g http://example.org/foo.git
> address@hidden 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?
Thanks,
Ludo’.