guix-commits
[Top][All Lists]
Advanced

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

04/04: guix hash: '-x' excludes '.git' even when it is a regular file.


From: Ludovic Courtès
Subject: 04/04: guix hash: '-x' excludes '.git' even when it is a regular file.
Date: Mon, 2 Jan 2017 15:39:37 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit eeb05e87d3d424b2f80b7e1ecb945c088ac6e201
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jan 2 15:23:21 2017 +0100

    guix hash: '-x' excludes '.git' even when it is a regular file.
    
    * guix/scripts/hash.scm (guix-hash)[vcs-file?]: Add case for '.git'
    regular files.
---
 guix/scripts/hash.scm |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm
index a339a85..640b241 100644
--- a/guix/scripts/hash.scm
+++ b/guix/scripts/hash.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2016, 2017 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2013 Nikita Karetnikov <address@hidden>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <address@hidden>
 ;;;
@@ -116,6 +116,9 @@ and 'hexadecimal' can be used as well).\n"))
     (case (stat:type stat)
       ((directory)
        (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS")))
+      ((regular)
+       ;; Git sub-modules have a '.git' file that is a regular text file.
+       (string=? (basename file) ".git"))
       (else
        #f)))
 



reply via email to

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