pdev: corrections pour supporter nouvelle version de git
This commit is contained in:
parent
5d3e9fefd7
commit
ded89be259
|
@ -624,7 +624,7 @@ function git_list_rbranches() {
|
||||||
function git_list_pbranches() {
|
function git_list_pbranches() {
|
||||||
# lister les branches locales et celles qui existent dans l'origine
|
# lister les branches locales et celles qui existent dans l'origine
|
||||||
# $1(=origin) et qui pourraient devenir une branche locale avec la commande
|
# $1(=origin) et qui pourraient devenir une branche locale avec la commande
|
||||||
# git checkout
|
# git checkout -b
|
||||||
local prefix="${1:-origin}/"
|
local prefix="${1:-origin}/"
|
||||||
{
|
{
|
||||||
git for-each-ref refs/heads/ --format='%(refname:short)'
|
git for-each-ref refs/heads/ --format='%(refname:short)'
|
||||||
|
|
6
pdev
6
pdev
|
@ -138,7 +138,11 @@ if [ "$action" == sync ]; then
|
||||||
|
|
||||||
setx -a branches=list_feature_branches "$origin"
|
setx -a branches=list_feature_branches "$origin"
|
||||||
for branch in "${branches[@]}"; do
|
for branch in "${branches[@]}"; do
|
||||||
|
if git_have_branch "$branch"; then
|
||||||
git_track_branch "$branch" "$origin"
|
git_track_branch "$branch" "$origin"
|
||||||
|
else
|
||||||
|
git branch -t "$branch" "$origin/$branch"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
@ -187,7 +191,7 @@ if [ "$action" == branch ]; then
|
||||||
if git_have_branch "$feature"; then
|
if git_have_branch "$feature"; then
|
||||||
git checkout "$feature" || r=$?
|
git checkout "$feature" || r=$?
|
||||||
elif git_have_rbranch "$feature" "$origin"; then
|
elif git_have_rbranch "$feature" "$origin"; then
|
||||||
git checkout "$feature" || r=$?
|
git checkout -b "$feature" "$origin/$feature" || r=$?
|
||||||
else
|
else
|
||||||
estepn "\
|
estepn "\
|
||||||
Vous allez créer la nouvelle feature branch ${COULEUR_VERTE}$feature${COULEUR_NORMALE}
|
Vous allez créer la nouvelle feature branch ${COULEUR_VERTE}$feature${COULEUR_NORMALE}
|
||||||
|
|
Loading…
Reference in New Issue