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:
Ricardo M. Correia
2015-04-21 19:46:29 +02:00
parent b1b4092ad5
commit c55c7e1c1e
3 changed files with 13 additions and 5 deletions
+2 -1
View File
@@ -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