Skip to content

Commit 674cdf2

Browse files
authored
Fix cleanGit for submodules of submodules (#413)
Repos that have submodules with submodules will have a `.git` file that references the relative location of the submodules dir in the `.git/modules`. Without this file the contents of submodules of submodules are excluded from the `cleanGit` output.
1 parent ba28de5 commit 674cdf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/clean-git.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ then
108108
# and use that to filter directory tree here
109109
||
110110
lib.any (i: (lib.hasSuffix i path)) [
111-
".gitmodules" ".git/config" ".git/index" ".git/HEAD" ".git/objects" ".git/refs" ] ||
111+
"/.git" ".gitmodules" ".git/config" ".git/index" ".git/HEAD" ".git/objects" ".git/refs" ] ||
112112
(lib.strings.hasInfix ".git/modules/" path &&
113113
lib.any (i: (lib.hasSuffix i path)) [
114114
"config" "index" "HEAD" "objects" "refs" ]);

0 commit comments

Comments
 (0)