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