modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2025-02-26 11:46:25 +04:00
parent c76fc0cfb6
commit 73fcc88503

View File

@ -33,34 +33,34 @@ function show_action() {
################################################################################ ################################################################################
function _push_branches() { function _push_branches() {
[ ${#push_branches[*]} -gt 0 ] || return
[ -n "$Origin" ] || Origin=origin [ -n "$Origin" ] || Origin=origin
git_have_remote "$Origin" || retun git_have_remote "$Origin" || return
if [ ${#push_branches[*]} -gt 0 ]; then
local -a cmds remote rbranch local -a cmds remote rbranch
for branch in "${push_branches[@]}"; do for branch in "${push_branches[@]}"; do
setx remote=git_get_branch_remote "$branch" setx remote=git_get_branch_remote "$branch"
if [ "$remote" == "$Origin" ]; then if [ "$remote" == "$Origin" ]; then
setx rbranch=git_get_branch_merge "$branch" setx rbranch=git_get_branch_merge "$branch"
if [ -n "$rbranch" ]; then if [ -n "$rbranch" ]; then
cmds+=("$(qvals git push "$Origin" "$branch:$rbranch")") cmds+=("$(qvals git push "$Origin" "$branch:$rbranch")")
else
cmds+=("$(qvals git push -u "$Origin" "$branch:$branch")")
fi
else else
cmds+=("$(qvals git push -u "$Origin" "$branch:$branch")") cmds+=("$(qvals git push -u "$Origin" "$branch:$branch")")
fi fi
done else
[ -n "$Push" ] || enote "L'option --no-push étant utilisée, les opérations à effectuer sont simplement affichées" cmds+=("$(qvals git push -u "$Origin" "$branch:$branch")")
for cmd in "${cmds[@]}"; do fi
einfo "$cmd" done
if [ -n "$Push" ]; then [ -n "$Push" ] || enote "L'option --no-push étant utilisée, les opérations à effectuer sont simplement affichées"
if ! eval "$cmd"; then for cmd in "${cmds[@]}"; do
ewarn "Une erreur s'est produite, les opérations seront simplement affichées" einfo "$cmd"
Push= if [ -n "$Push" ]; then
fi if ! eval "$cmd"; then
ewarn "Une erreur s'est produite, les opérations seront simplement affichées"
Push=
fi fi
done fi
fi done
} }
function init_repo_action() { function init_repo_action() {
@ -159,8 +159,9 @@ function init_dist_action() {
} }
function init_feature_action() { function init_feature_action() {
local branch="$FEATURE${1#$FEATURE}" local branch="${1#$FEATURE}"
[ -n "$branch" ] || die "Vous devez définir la nom de la branche à créer" [ -n "$branch" ] || die "Vous devez définir la nom de la branche à créer"
branch="$FEATURE$branch"
if ! array_contains AllBranches "$branch"; then if ! array_contains AllBranches "$branch"; then
[ -n "$DEVELOP" ] || die "La branche DEVELOP n'a pas été définie" [ -n "$DEVELOP" ] || die "La branche DEVELOP n'a pas été définie"