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

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 1a73454e55 gnu: home: dotfiles: Fix inclusion of directories having 
.git in their name.
1a73454e55 is described below

commit 1a73454e551d87ccd4cbaec162cdd659dcc9a9e1
Author: Giacomo Leidi <[email protected]>
AuthorDate: Tue Mar 3 23:25:54 2026 +0100

    gnu: home: dotfiles: Fix inclusion of directories having .git in their name.
    
    * gnu/home/services/dotfiles.scm (%home-dotfiles-excluded): Replace
    .git/.* with /.git/.* .
    * doc/guix.texi: Document it.
    
    Fixes https://codeberg.org/guix/guix/issues/6808
    
    Change-Id: Ib6c824bb4bf5a5b3d6939807667c7961ce0cf6d2
---
 doc/guix.texi                  | 2 +-
 gnu/home/services/dotfiles.scm | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index d7f4c41d57..12e9d3465a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -51409,7 +51409,7 @@ the @code{home-dotfiles-service-type} will only 
provision dotfiles from this
 subset of applications.  This field will be ignored if @code{layout} is set
 to @code{'plain}.
 
-@item @code{excluded} (default: @code{'(".*~" ".*\\.swp" "\\.git/.*" 
"\\.gitignore")}) (type: list-of-strings)
+@item @code{excluded} (default: @code{'(".*~" ".*\\.swp" "/\\.git/.*" 
"\\.gitignore")}) (type: list-of-strings)
 The list of file patterns @code{home-dotfiles-service-type} will exclude
 while visiting each one of the @code{directories}.
 
diff --git a/gnu/home/services/dotfiles.scm b/gnu/home/services/dotfiles.scm
index 1860009275..692b96f487 100644
--- a/gnu/home/services/dotfiles.scm
+++ b/gnu/home/services/dotfiles.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2024 Ludovic Courtès <[email protected]>
-;;; Copyright © 2024 Giacomo Leidi <[email protected]>
+;;; Copyright © 2024, 2026 Giacomo Leidi <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,7 +45,9 @@
 (define %home-dotfiles-excluded
   '(".*~"
     ".*\\.swp"
-    "\\.git/.*"
+    ;; This first / is safe until regexp-exec in directory-contents
+    ;; is passed an absolute file name.
+    "/\\.git/.*"
     "\\.gitignore"))
 
 (define %home-dotfiles-layouts

Reply via email to