guix-commits
[Top][All Lists]
Advanced

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

02/02: doc: Explain 'guix hash -r' for Git checkouts.


From: Ludovic Courtès
Subject: 02/02: doc: Explain 'guix hash -r' for Git checkouts.
Date: Wed, 13 Jul 2016 22:00:29 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit db97a03a892c662f316c9fd6a497b4b2a18626b3
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jul 13 23:51:17 2016 +0200

    doc: Explain 'guix hash -r' for Git checkouts.
    
    * doc/guix.texi (origin Reference): Add xref to "guix download" and
    "guix hash".
    (Invoking guix hash): Provide an example to compute the hash of a Git
    checkout.
    
    Co-authored-by: Troy Sankey <address@hidden>
---
 doc/guix.texi |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 67ece1d..4b55473 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2669,6 +2669,7 @@ Examples include:
 download a file from the HTTP, HTTPS, or FTP URL specified in the
 @code{uri} field;
 
address@hidden git-fetch
 @item @var{git-fetch} from @code{(guix git-download)}
 clone the Git version control repository, and check out the revision
 specified in the @code{uri} field as a @code{git-reference} object; a
@@ -2686,6 +2687,10 @@ A bytevector containing the SHA-256 hash of the source.  
Typically the
 @code{base32} form is used here to generate the bytevector from a
 base-32 string.
 
+You can obtain this information using @code{guix download}
+(@pxref{Invoking guix download}) or @code{guix hash} (@pxref{Invoking
+guix hash}).
+
 @item @code{file-name} (default: @code{#f})
 The file name under which the source code should be saved.  When this is
 @code{#f}, a sensible default value will be used in most cases.  In case
@@ -4569,6 +4574,17 @@ hash (@pxref{Invoking guix archive}).
 @c FIXME: Replace xref above with xref to an ``Archive'' section when
 @c it exists.
 
address@hidden git-fetch
+As an example, here is how you would compute the hash of a Git checkout,
+which is useful when using the @code{git-fetch} method (@pxref{origin
+Reference}):
+
address@hidden
+$ git clone http://example.org/foo.git
+$ cd foo
+$ rm -rf .git
+$ guix hash -r .
address@hidden example
 @end table
 
 @node Invoking guix import



reply via email to

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