set pushurl from pullurl when configured
This commit is contained in:
parent
7f747743c6
commit
d4516a55a6
1 changed files with 7 additions and 1 deletions
|
@ -1351,7 +1351,13 @@ setgitremote() {
|
||||||
|
|
||||||
|
|
||||||
git remote set-url ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PULLURL:-$MSC_GIT_PULLURL_DEFAULT}
|
git remote set-url ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PULLURL:-$MSC_GIT_PULLURL_DEFAULT}
|
||||||
git remote set-url --push ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PUSHURL:-$MSC_GIT_PUSHURL_DEFAULT}
|
# sequence for push-url
|
||||||
|
# configured pushurl from .bashrc
|
||||||
|
# configured pullurl from .bashrc (if no pushrul is defined and pushurl is the same as pullurl)
|
||||||
|
# default pushurl (if no push or pullurl is defined in .bashrc)
|
||||||
|
# default pullurl (if no push/pull/default_pushurl is defined, then default pushurl is the same as default pullurl)
|
||||||
|
git remote set-url --push ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} \
|
||||||
|
${MSC_GIT_PUSHURL:-${MSC_GIT_PULLURL:-${MSC_GIT_PUSHURL_DEFAULT:-$MSC_GIT_PULLURL_DEFAULT}}}
|
||||||
git branch -u "${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT}"/"${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}"
|
git branch -u "${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT}"/"${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}"
|
||||||
git checkout ${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}
|
git checkout ${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}
|
||||||
loginfo "now remotes are: $(git remote -v)"
|
loginfo "now remotes are: $(git remote -v)"
|
||||||
|
|
Loading…
Reference in a new issue