fetchgit: Add support for specifying branch name
This is useful when `leaveDotGit = true` and some other derivation expects some branch name to exist. Previously, `nix-prefetch-git` always created a branch with a hard-coded name (`fetchgit`).
This commit is contained in:
@@ -9,6 +9,7 @@ header "exporting $url (rev $rev) into $out"
|
||||
$fetcher --builder --url "$url" --out "$out" --rev "$rev" \
|
||||
${leaveDotGit:+--leave-dotGit} \
|
||||
${deepClone:+--deepClone} \
|
||||
${fetchSubmodules:+--fetch-submodules}
|
||||
${fetchSubmodules:+--fetch-submodules} \
|
||||
${branchName:+--branch-name "$branchName"}
|
||||
|
||||
stopNest
|
||||
|
||||
Reference in New Issue
Block a user