From: Nicolas Odermatt-Lemay <nodermattlemay@gmail.com>
To: 71217@debbugs.gnu.org
Subject: bug#71217: gnu: home: dotfiles: Files not excluded when they should
Date: Sun, 26 May 2024 22:13:26 -0400 [thread overview]
Message-ID: <CAC-BrWpcu=+Lb_=0VUSWP4w92ohTH30zY1YA6K=-GiegfpVB7A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]
Hello,
While attempting to setup home-dotfiles-service, I noticed that some files
were being symlinked even though they were in the variable
`%home-dotfiles-excluded', such as all the files of the .git directory.
This patch seems to fix the problem :
diff --git a/gnu/home/services/dotfiles.scm b/gnu/home/services/dotfiles.scm
index 823bdb03fb..38f7ff83d0 100644
--- a/gnu/home/services/dotfiles.scm
+++ b/gnu/home/services/dotfiles.scm
@@ -45,7 +45,7 @@ (define-module (gnu home services dotfiles)
(define %home-dotfiles-excluded
'(".*~"
".*\\.swp"
- "\\.git"
+ "\\.git/.*"
"\\.gitignore"))
(define %home-dotfiles-layouts
@@ -138,8 +138,7 @@ (define* (directory-contents directory #:key (packages
#f))
(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)
[-- Attachment #2: Type: text/html, Size: 1475 bytes --]
next reply other threads:[~2024-05-27 2:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 2:13 Nicolas Odermatt-Lemay [this message]
2024-11-20 22:33 ` [bug#71217] gnu: home: dotfiles: Files not excluded when they should Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAC-BrWpcu=+Lb_=0VUSWP4w92ohTH30zY1YA6K=-GiegfpVB7A@mail.gmail.com' \
--to=nodermattlemay@gmail.com \
--cc=71217@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.