autosélection de la feature branch, ou choix dans un menu pour merge
This commit is contained in:
parent
2f173c2660
commit
c0bdafd864
29
pdev
29
pdev
|
@ -96,11 +96,28 @@ Vous allez créer la nouvelle feature branch ${COULEUR_VERTE}$feature${COULEUR_N
|
|||
fi
|
||||
|
||||
feature="$1"
|
||||
[ -n "$feature" ] || feature="$branch"
|
||||
is_feature_branch "$feature" || exit 0
|
||||
git_is_branch "$feature" || die "$feature: branche invalide"
|
||||
if [ -n "$feature" ]; then
|
||||
is_feature_branch "$feature" || die "$feature: ce n'est pas une feature branch"
|
||||
git_have_branch "$feature" || die "$feature: branche invalide"
|
||||
elif is_feature_branch "$branch"; then
|
||||
feature="$branch"
|
||||
fi
|
||||
|
||||
if [ "$action" == merge ]; then
|
||||
if [ -z "$feature" ]; then
|
||||
setx -a branches=list_feature_branches
|
||||
if [ ${#branches[*]} -eq 0 ]; then
|
||||
die "Aucune feature branch n'a été trouvée"
|
||||
elif [ ${#branches[*]} -eq 1 ]; then
|
||||
feature="${branches[0]}"
|
||||
estepn "Autosélection de $feature"
|
||||
else
|
||||
simple_menu feature branches -d "$branch" \
|
||||
-t "Choix de la feature branch" \
|
||||
-m "Veuillez choisir la branche"
|
||||
fi
|
||||
fi
|
||||
|
||||
estepn "\
|
||||
Intégration de la feature branch ${COULEUR_VERTE}$feature${COULEUR_NORMALE}
|
||||
dans la branche de destination ${COULEUR_BLEUE}develop${COULEUR_NORMALE}"
|
||||
|
@ -118,8 +135,10 @@ dans la branche de destination ${COULEUR_BLEUE}develop${COULEUR_NORMALE}"
|
|||
fi
|
||||
|
||||
elif [ "$action" == log ]; then
|
||||
git log develop.."$branch"
|
||||
[ -z "$feature" ] && exit 0
|
||||
git log develop.."$feature"
|
||||
|
||||
elif [ "$action" == diff ]; then
|
||||
git diff develop..."$branch"
|
||||
[ -z "$feature" ] && exit 0
|
||||
git diff develop..."$feature"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue