On 10/28/2015 12:50 PM, Vladimir Prus wrote:
On 28-Oct-15 6:20 AM, Michel Morin wrote:
Beman Dawes wrote:
Is it possible to write a curl script that could make the change for all libraries?
Like this
REPOLIST=$(curl https://raw.githubusercontent.com/boostorg/boost/master/.gitmodules \ | awk -F '"' '{print $2}') for REPO in $REPOLIST; do curl --user $USERNAME:$PASSWORD \ --data '{"name": $REPO, "default_branch":"develop"}' \ https://api.github.com/repos/boostorg/$REPO done
? (You need to set USERNAME and PASSWORD in some way before using the command.)
I have ran the above, with some quoting fixes:
REPOLIST=$(curl https://raw.githubusercontent.com/boostorg/boost/master/.gitmodules | awk -F '"' '{print $2}') for REPO in $REPOLIST; do curl -H "Authorization: token <redacted>" --data "{\"name\": \"$REPO\", \"default_branch\": \"develop\"}" https://api.github.com/repos/boostorg/$REPO; done
This has updated every repo that is included in master. I've updated hana by hand.
Is this fine with everybody?
I think it should be run on develop since we have submodules that only exist on develop and not master. I think there's one consequence of this change that has not been mentioned in the discussion. When checking out libraries from git people will get develop branch by default and not master. This is fine if the checkout is done for development, which is the most likely the case, but may be a surprise to some who expect to get master by default. Personally, I'm ok with this change.