guix-commits
[Top][All Lists]
Advanced

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

branch master updated: guix hash: Allow '--exclude-vcs' option using 'gi


From: guix-commits
Subject: branch master updated: guix hash: Allow '--exclude-vcs' option using 'git' serializer.
Date: Tue, 04 Jan 2022 20:40:38 -0500

This is an automated email from the git hooks/post-receive script.

samplet pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 8646f1f7a5 guix hash: Allow '--exclude-vcs' option using 'git' 
serializer.
8646f1f7a5 is described below

commit 8646f1f7a53d28f305f30420ad23b670159c53a9
Author: zimoun <zimon.toutoune@gmail.com>
AuthorDate: Tue Jan 4 21:47:15 2022 +0100

    guix hash: Allow '--exclude-vcs' option using 'git' serializer.
    
    * guix/scripts/hash.scm (git-hash): Use '#:select?' with
    'git-hash-directory'.
    * tests/guix-hash.sh: Adjust accordingly.
    
    Signed-off-by: Timothy Sample <samplet@ngyro.com>
---
 guix/scripts/hash.scm | 2 +-
 tests/guix-hash.sh    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm
index d73e3d13dd..c44a4de9a4 100644
--- a/guix/scripts/hash.scm
+++ b/guix/scripts/hash.scm
@@ -69,7 +69,7 @@
       ((directory) #t)
       (else #f)))
   (if directory?
-      (git-hash-directory file algorithm)
+      (git-hash-directory file algorithm #:select? select?)
       (git-hash-file file algorithm)))
 
 
diff --git a/tests/guix-hash.sh b/tests/guix-hash.sh
index 854c493514..8b03c7985d 100644
--- a/tests/guix-hash.sh
+++ b/tests/guix-hash.sh
@@ -53,6 +53,7 @@ mkdir "$tmpdir/subdir"
 
 test `guix hash -S nar "$tmpdir"` = 
10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p
 test `guix hash -S nar "$tmpdir" -H sha512` = 
301ra58c2vahczzxiyfin41mpyb0ljh4dh9zn3ijvwviaw1j40sfzw5skh9x945da88n3785ggifzig7acd6k72h0mpsc20m1f66m9n
+test `guix hash -S git "$tmpdir"` = 
1m9yxz99g7askm88h6hzyv4g2bfv57rp5wvwp3iq5ypsplq1xkkk
 test `guix hash -S git "$tmpdir" -H sha512` = 
158b10d1bsdk4pm8ym9cg9ckfak1b0cgpw7365cl6s341ir380mh2f4ylicyh8khyrfnwq5cn9766d7m8fbfwwl94ndkv456v6a8knr
 
 # Deprecated --recursive option
@@ -76,7 +77,7 @@ test `guix hash -S git $tmpdir` = 
0ghlpca9xaswa1ay1g55dknwd9q899mi3ahfr43pq083v8
 
 # ...but remains the same when using `-x'
 test `guix hash -S nar $tmpdir -x` = 
10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p
-test `guix hash -S git $tmpdir -x` = 
0ghlpca9xaswa1ay1g55dknwd9q899mi3ahfr43pq083v8wisjc7
+test `guix hash -S git $tmpdir -x` = 
1m9yxz99g7askm88h6hzyv4g2bfv57rp5wvwp3iq5ypsplq1xkkk
 
 # Without '-r', this should fail.
 ! guix hash "$tmpdir"



reply via email to

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