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 4533da834d gnu: home: dotfiles: Files not excluded when they should.
4533da834d is described below
commit 4533da834d277dda82ebf51861eb5796e20508df
Author: Giacomo Leidi <[email protected]>
AuthorDate: Mon Dec 15 20:03:00 2025 +0100
gnu: home: dotfiles: Files not excluded when they should.
* gnu/home/services/dotfiles.scm (%home-dotfiles-excluded): Match
content of .git directories.
(directory-contents): Match whole file-name instead of basename.
* doc/guix.texi: Document it.
Fixes <https://issues.guix.gnu.org/71217>
Authored-by: Nicolas Odermatt-Lemay <[email protected]>
Change-Id: I2929fe3318e1f9f0b552c891207524dea25389ed
Signed-off-by: Cayetano Santos <[email protected]>
---
doc/guix.texi | 2 +-
gnu/home/services/dotfiles.scm | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 0a6020220c..bb07432d49 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -51103,7 +51103,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 c7c798abc4..1860009275 100644
--- a/gnu/home/services/dotfiles.scm
+++ b/gnu/home/services/dotfiles.scm
@@ -45,7 +45,7 @@
(define %home-dotfiles-excluded
'(".*~"
".*\\.swp"
- "\\.git"
+ "\\.git/.*"
"\\.gitignore"))
(define %home-dotfiles-layouts
@@ -135,8 +135,7 @@ value, excluding files that match any of the patterns
configured."
(define (filter-files directory)
(find-files directory
(lambda (file stat)
- (not (regexp-exec exclusion-rx
- (basename file))))))
+ (not (regexp-exec exclusion-rx file)))))
(if (and stow? packages (maybe-value-set? packages))
(append-map filter-files
(map (lambda (pkg)