0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

fetchgit: add lfs support

This commit is contained in:
Jonathan Ringer 2020-12-04 23:32:48 -08:00 committed by Jonathan Ringer
parent ecf84de70c
commit 741285611f
3 changed files with 14 additions and 3 deletions

View file

@ -9,6 +9,7 @@ hashType=$NIX_HASH_ALGO
deepClone=$NIX_PREFETCH_GIT_DEEP_CLONE
leaveDotGit=$NIX_PREFETCH_GIT_LEAVE_DOT_GIT
fetchSubmodules=
fetchLFS=
builder=
branchName=$NIX_PREFETCH_GIT_BRANCH_NAME
@ -72,6 +73,7 @@ for arg; do
--quiet) QUIET=true;;
--no-deepClone) deepClone=;;
--leave-dotGit) leaveDotGit=true;;
--fetch-lfs) fetchLFS=true;;
--fetch-submodules) fetchSubmodules=true;;
--builder) builder=true;;
-h|--help) usage; exit;;
@ -283,6 +285,11 @@ clone_user_rev() {
local url="$2"
local rev="${3:-HEAD}"
if [ -n "$fetchLFS" ]; then
HOME=$TMPDIR
git lfs install
fi
# Perform the checkout.
case "$rev" in
HEAD|refs/*)