forked from kiss-community/kiss
kiss: simplify pkg_source_git
This commit is contained in:
parent
993bea5ba0
commit
6a00546b3b
6
kiss
6
kiss
@ -454,10 +454,8 @@ pkg_source_git() {
|
|||||||
git remote set-url origin "${2%[#@]*}" 2>/dev/null ||
|
git remote set-url origin "${2%[#@]*}" 2>/dev/null ||
|
||||||
git remote add origin "${2%[#@]*}"
|
git remote add origin "${2%[#@]*}"
|
||||||
|
|
||||||
# Only fetch latest changes if not <url>[#]<sha|tag>.
|
git fetch -t origin "$com" ||
|
||||||
case $2 in *"#$com") ;; *)
|
git fetch -t
|
||||||
git fetch -t --filter=tree:0 origin "$com" || git fetch -t
|
|
||||||
esac
|
|
||||||
|
|
||||||
git -c advice.detachedHead=0 checkout "${com:-FETCH_HEAD}"
|
git -c advice.detachedHead=0 checkout "${com:-FETCH_HEAD}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user