From 6963d4109ad43ea79b9aabc332ec48de29708d01 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 18 Oct 2022 11:22:56 +0400 Subject: [PATCH] uproject: push -f force le push --- lib/ulib/vcs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ulib/vcs b/lib/ulib/vcs index a8aaf36..40696cb 100644 --- a/lib/ulib/vcs +++ b/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