Skip to content

Commit

Permalink
fix: incorrect argument passing to git push (#574)
Browse files Browse the repository at this point in the history
Signed-off-by: Nat Welch <[email protected]>
Co-authored-by: andy Augustin <[email protected]>
  • Loading branch information
icco and AndreasAugustin authored Oct 15, 2024
1 parent 1c776a0 commit 44e59ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sync_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,19 +293,19 @@ function push () {
local is_force=$2
local is_with_tags=$3

local additional_params=" "
args=(--set-upstream origin "${branch}")

if [ "$is_force" == true ] ; then
warn "forcing the push."
additional_params="${additional_params}--force "
args+=(--force)
fi

if [ "$is_with_tags" == true ] ; then
warn "include tags."
additional_params="${additional_params}--tags "
args+=(--tags)
fi

git push "${additional_params}"--set-upstream origin "${branch}"
git push "${args[@]}"
}

####################################
Expand Down

0 comments on commit 44e59ba

Please sign in to comment.