mirror of
https://codeberg.org/kiss-community/kiss
synced 2025-01-12 22:00:09 -07:00
kiss: git fixes
This commit is contained in:
parent
53e856195b
commit
38e81b6920
10
kiss
10
kiss
@ -304,15 +304,15 @@ pkg_extract() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
git+*)
|
git+*)
|
||||||
# Split the source into URL + OBJECT (branch or commit).
|
url=${src##git+}
|
||||||
url=${src##git+} com=${url##*[@#]} com=${com#${url%[#@]*}}
|
com=${url##*[@#]}
|
||||||
|
com=${com#"${url%[#@]*}"}
|
||||||
|
|
||||||
# Shallow clone branches, commits or default branch.
|
|
||||||
log "$1" "cloning ${url%[#@]*}"; {
|
log "$1" "cloning ${url%[#@]*}"; {
|
||||||
git init
|
git init
|
||||||
git remote add origin "${url%[#@]*}"
|
git remote add origin "${url%[#@]*}"
|
||||||
git fetch --tags --depth=1 origin "$com" || git fetch --tags
|
git fetch -t --depth 1 origin "$com" || git fetch -t
|
||||||
git checkout "${com:-FETCH_HEAD}"
|
git -c advice.detachedHead=0 checkout "${com:-FETCH_HEAD}"
|
||||||
} || die "$1" "failed to clone $src"
|
} || die "$1" "failed to clone $src"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user