summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit/builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/fetchgit/builder.sh')
-rw-r--r--pkgs/build-support/fetchgit/builder.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh
index 08a1cc5d3419..ba06aed90e18 100644
--- a/pkgs/build-support/fetchgit/builder.sh
+++ b/pkgs/build-support/fetchgit/builder.sh
@@ -7,7 +7,9 @@ if test -n "$rev"; then
   cd $out
   git checkout $rev
 fi
-find $out -name .git\* | xargs rm -rf
 
-stopNest
+if test -z "$leaveDotGit"; then
+    find $out -name .git\* | xargs rm -rf
+fi
 
+stopNest