diff options
author | Silvan Mosberger <infinisil@icloud.com> | 2019-04-02 18:01:07 +0200 |
---|---|---|
committer | Silvan Mosberger <infinisil@icloud.com> | 2019-04-08 16:20:09 +0200 |
commit | eb09fd5a88a00c515080b961c2856a6743326878 (patch) | |
tree | f4b145c2a2d23f5e236464c2e204b0658ec97cc8 /lib/sources.nix | |
parent | 69555825f84a0f81c32097913088ab586e12b982 (diff) |
lib.cleanSourceFilter: Filter all .git, not just directories
In the case of a worktree created with `git worktree add`, .git is actually a file with contents pointing to the original repository.
Diffstat (limited to 'lib/sources.nix')
-rw-r--r-- | lib/sources.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sources.nix b/lib/sources.nix index 1a9f3f7d1f343..f02ddad17c6d7 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -12,8 +12,8 @@ rec { # Bring in a path as a source, filtering out all Subversion and CVS # directories, as well as backup files (*~). cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! ( - # Filter out Subversion and CVS directories. - (type == "directory" && (baseName == ".git" || baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) || + # Filter out version control software files/directories + (baseName == ".git" || type == "directory" && (baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) || # Filter out editor backup / swap files. lib.hasSuffix "~" baseName || builtins.match "^\\.sw[a-z]$" baseName != null || |