]> git.phdru.name Git - git-scripts.git/commitdiff
Feat(pull-usrlocalsrc): Pull branch `main`, merge into local `master`
authorOleg Broytman <phd@phdru.name>
Fri, 16 Apr 2021 14:24:36 +0000 (17:24 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 16 Apr 2021 14:24:36 +0000 (17:24 +0300)
SJW shit.

pull-usrlocalsrc

index 1413803bf598da1d04b88d1777ab870b29401156..ef9167b7f70561a8ac522b1400adda822c7cae33 100755 (executable)
@@ -10,7 +10,8 @@ cat "$prog_dir"/locate-all.list | grep -F /usr/local/src |
 while read d; do
    echo "----- $d -----"; cd "$d" &&
    if has_remote upstream && has_remote origin; then
-      git pull upstream master && git push origin master || exit 1
+      { git pull upstream master || git pull upstream main:master; } &&
+         git push origin master || exit 1
    elif has_remote origin; then
       git pull origin master || exit 1
    fi