summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2017-04-03 21:57:24 +0200
committerAndy Wingo <wingo@igalia.com>2017-04-28 13:49:25 +0200
commit572907daff98a77a4215861a88b81d2f30542c09 (patch)
treee2afeb2bb9caf45e20d38720609ca8c0864dcbb6 /doc
parent68fe9df98ae9c70f362ebafd7628e17ada9b6841 (diff)
downloadguix-572907daff98a77a4215861a88b81d2f30542c09.tar.gz
guix hash: Add --git option to hash a git checkout.
* guix/scripts/hash.scm (show-help, %options): Add -g option.
(vcs-file?): Pull out to top.
(guix-hash-git-checkout): New function.
(guix-hash): Support hashing of Git URLs.
* doc/guix.texi (Invoking guix hash): Document guix hash --git.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 85235846d5..c0ffdfd2d6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5386,6 +5386,23 @@ $ git clone http://example.org/foo.git
 $ cd foo
 $ guix hash -rx .
 @end example
+
+Hashing a git checkout is so common that it has its own alias:
+
+@item --git
+@itemx -g
+Clones the git repository at @var{file} into a temporary directory and
+recursively hashes it, excluding the @file{.git} subdirectory.  This is
+mainly useful if you want to get the Guix hash of the current Git
+checkout:
+
+@example
+$ git clone http://example.org/foo.git
+$ cd foo
+# Hack a bunch of things, make some commits
+$ guix hash -g .
+@end example
+
 @end table
 
 @node Invoking guix import