常规更新
This commit is contained in:
Vendored
+1
-5
@@ -10,11 +10,7 @@ fetch_repo() {
|
||||
local branch="$2"
|
||||
local dir="$3"
|
||||
if [ -d "$dir" ]; then
|
||||
git -C "$dir" rev-parse --is-inside-work-tree >/dev/null
|
||||
git -C "$dir" remote set-url origin "$repo"
|
||||
git -C "$dir" fetch origin "$branch"
|
||||
git -C "$dir" checkout "$branch"
|
||||
git -C "$dir" pull --ff-only origin "$branch"
|
||||
echo "文件夹【$dir】已存在 跳过初始化 "
|
||||
else
|
||||
git clone --branch "$branch" --single-branch "$repo" "$dir"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user