uproject: push -f force le push
This commit is contained in:
parent
9665d5a5d0
commit
6963d4109a
10
lib/ulib/vcs
10
lib/ulib/vcs
|
@ -617,23 +617,23 @@ function git_push() {
|
|||
if [ -n "$all" ]; then
|
||||
# On a demandé à pusher toutes les branches et tous les tags
|
||||
local r
|
||||
git push --all "$@"; r=$?
|
||||
git push --all ${force:+--force} "$@"; r=$?
|
||||
if [ $r -eq 0 ]; then
|
||||
git push --tags "$@"; r=$?
|
||||
git push --tags ${force:+--force} "$@"; r=$?
|
||||
fi
|
||||
return $r
|
||||
elif [ -n "$all_branches" ]; then
|
||||
# On a demandé à pusher toutes les branches
|
||||
git push --all "$@"
|
||||
git push --all ${force:+--force} "$@"
|
||||
return $?
|
||||
elif [ -n "$all_tags" ]; then
|
||||
# On a demandé à pusher tous les tags
|
||||
git push --tags "$@"
|
||||
git push --tags ${force:+--force} "$@"
|
||||
return $?
|
||||
elif [ $# -gt 0 ]; then
|
||||
# Sinon, si des arguments sont spécifiés, les passer à git sans
|
||||
# modification
|
||||
git push "$@"
|
||||
git push ${force:+--force} "$@"
|
||||
return $?
|
||||
elif git_have_annex; then
|
||||
# Si une annexe existe dans le dépôt, demander à git-annex de faire la
|
||||
|
|
Loading…
Reference in New Issue