kiss: handle remote swaps

This commit is contained in:
Dylan Araps 2021-08-25 14:29:39 +03:00
parent 755838425f
commit c84775c152
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

6
kiss
View File

@ -454,10 +454,10 @@ pkg_source_git() {
log "$repo_name" "Checking out ${com:-FETCH_HEAD}"
[ -d .git ] || {
git init
[ -d .git ] || git init
git remote set-url origin "${1%[#@]*}" 2>/dev/null ||
git remote add origin "${1%[#@]*}"
}
# Only fetch latest changes if not <url>[#]<sha|tag>.
case $1 in *"#$com") ;; *)