FFmpeg-Builds/images/base/git-mini-clone.sh

13 lines
248 B
Bash
Raw Permalink Normal View History

2020-09-05 20:34:23 +00:00
#!/bin/bash
set -xe
REPO="$1"
REF="$2"
DEST="$3"
git init "$DEST"
git -C "$DEST" remote add origin "$REPO"
2022-07-12 23:46:13 +00:00
retry-tool git -C "$DEST" fetch --depth=1 origin "$REF"
2020-09-05 20:34:23 +00:00
git -C "$DEST" config advice.detachedHead false
git -C "$DEST" checkout FETCH_HEAD