From 29edcc18f03edf82b019047357fdd0c4c0213a34 Mon Sep 17 00:00:00 2001 From: GabrielInTheWorld Date: Thu, 9 Dec 2021 16:05:50 +0100 Subject: [PATCH] Improves the 'services-to-master' function --- services-to-master.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services-to-master.sh b/services-to-master.sh index 1214a4a58..5fcddb623 100755 --- a/services-to-master.sh +++ b/services-to-master.sh @@ -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