From edcbc84b529cdfdaf8e2012cef0e66a584ff7113 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 20 Aug 2024 16:29:27 +0300 Subject: [PATCH] Feat(update-remotes): Get additional remotes from `.git/config` --- update-remotes | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/update-remotes b/update-remotes index ead8e91..757bfb3 100755 --- a/update-remotes +++ b/update-remotes @@ -4,6 +4,8 @@ set -e branches="master ${1:+$@}" current="`git config --get --path remote.current.url`" || : origin="`git config --get --path remote.origin.url`" || : +web="`git config --get --path remote.web.url`" || : +remotes="`git config --get update-remotes.remotes`" || : if [ -n "$origin" ]; then if [ -n "$current" ]; then @@ -23,11 +25,15 @@ git fetch current { git pull --ff-only current master || git reset --hard current/master ; } git set-date -web="`git config --get --path remote.web.url`" if [ -n "$web" ]; then git push --force web $branches fi cd "$current" + +for remote in $remotes; do + git push --force $remote $branches +done + git pull origin exec git set-date -- 2.39.5