fi
if ! git remote -v | sed -e 's/\t/ /g' | grep -q "^$name $addr $type$"; then
+ # This might not sync everything in the first run as some weird behavior
+ # happens according to this example:
+ #
+ # mkdir test && cd test
+ # git init
+ # git remote add origin git.example.org:test
+ # git remote set-url --add --push origin test.example.org:test
+ # git remote -v
+ #
+ # Expected output:
+ #
+ # origin git.example.org:test (fetch)
+ # origin git.example.org:test (push)
+ # origin test.example.org:test (push)
+ #
+ # Actual output:
+ #
+ # origin git.example.org:test (fetch)
+ # origin test.example.org:test (push)
+ #
+ # You can get the expected output by doing this additional step:
+ #
+ # git remote set-url --add --push origin git.example.org:test
git remote $command $name $addr
fi
done