From 1dfaad73ed98254c1c0522156fe45b115e0a8eb4 Mon Sep 17 00:00:00 2001 From: Sebastian Jordan Date: Tue, 14 Jun 2022 00:14:29 +0200 Subject: [PATCH] nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone The fetchgit function in nixpkgs sets the leaveDotGit argument to true if deepClone is set to true. nix-prefetch-git did behave differently. It would not assume --leave-dotGit if --deepClone is specified. With this change the inconsistency is addressed by assuming --leave-dotGit if --deepClone is specified. --- pkgs/build-support/fetchgit/nix-prefetch-git | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 4e6f25b8dd7..f6a317a888a 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -105,6 +105,10 @@ for arg; do fi done +if test -n $deepClone; then + leaveDotGit=true +fi + if test -z "$url"; then usage fi