guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] guix hash: -g hashes a git repository


From: Andy Wingo
Subject: Re: [PATCH] guix hash: -g hashes a git repository
Date: Tue, 04 Apr 2017 15:57:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Tue 04 Apr 2017 14:21, address@hidden (Ludovic Courtès) writes:

>> +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.

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:
>> 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?

Could be!  Or "git rev-parse HEAD".  I'll do that.

Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]