git » repo-mgmt.git » commit 522285c

use set-url for re-setting upstream

author Urja (ARMLFS builder)
2024-07-12 17:59:32 UTC
committer Urja (ARMLFS builder)
2024-07-12 17:59:32 UTC
parent 996d0c9c8341d814ba279b3fd0671fc0fac8f4fb

use set-url for re-setting upstream

git-set-upstream.sh +2 -1

diff --git a/git-set-upstream.sh b/git-set-upstream.sh
index 02fa151..a640bed 100755
--- a/git-set-upstream.sh
+++ b/git-set-upstream.sh
@@ -23,8 +23,9 @@ doagit() {
 	echo /$3/$g
 	cd /$3/$g
 	if grep -q "remote \"$RMT\"" .git/config; then
-		local CMD="git remote remove $RMT"
+		local CMD="git remote set-url $RMT $SRV/$1/$g.git"
 		asowner "$CMD"
+		return 0
 	fi
 	local CMD="git remote add $RMT $SRV/$1/$g.git"
 	asowner "$CMD"