]> git.phdru.name Git - git-scripts.git/commitdiff
Feat(update-remotes): Fetch additional branches if there're any
authorOleg Broytman <phd@phdru.name>
Thu, 14 Dec 2023 20:05:03 +0000 (23:05 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 14 Dec 2023 20:26:37 +0000 (23:26 +0300)
update-remotes

index 2eb9427fa531243a8a680c2b9fa5dc55a75ec870..6fabc29a60439b086d47c6fbbb0b17e8e1c7e5db 100755 (executable)
@@ -16,7 +16,8 @@ elif [ -z "$current" ]; then
    exit 1
 fi
 
-{ git pull --ff-only current master || git reset --hard current/master } &&
+git fetch current &&
+{ git pull --ff-only current master || git reset --hard current/master ; } &&
 
 web="`git config --get --path remote.web.url`" &&
 if [ -n "$web" ]; then