unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] guix hash: -g hashes a git repository
Date: Tue, 04 Apr 2017 14:21:47 +0200	[thread overview]
Message-ID: <87o9wcs6qs.fsf@gnu.org> (raw)
In-Reply-To: <20170403195837.4504-1-wingo@igalia.com> (Andy Wingo's message of "Mon, 3 Apr 2017 21:58:37 +0200")

Hello!

Andy Wingo <wingo@igalia.com> 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:
> +@example
> +$ git clone http://example.org/foo.git
> +$ guix hash -g foo
> +@end example

In this case -g is equivalent to -rx.

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

Thanks,
Ludo’.

  reply	other threads:[~2017-04-04 12:21 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 [this message]
2017-04-04 13:57   ` Andy Wingo
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=87o9wcs6qs.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=wingo@igalia.com \
    /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).