Merge pull request #6310 from GabrielInTheWorld/dev

Improves the 'services-to-master' function
This commit is contained in:
GabrielInTheWorld 2021-12-10 10:20:16 +01:00 committed by GitHub
commit 95504ce8c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,13 +19,11 @@ function get_upstream_branch {
}
function get_upstream_name {
{
# try
git ls-remote --exit-code upstream 2>/dev/null && echo "upstream"
} || {
# catch
git ls-remote --exit-code upstream &>/dev/null || {
echo "origin"
return
}
echo "upstream"
}
function pull_latest_commit {
@ -43,6 +41,7 @@ function pull_latest_commit {
git pull $REMOTE_NAME $BRANCH_NAME;
echo "$SUBMODULE_NAME: Successfully pulled latest commit"
echo ""
}
export -f pull_latest_commit