From 9a2378ba74a7d61d426fb4df9a6f94ce89195d8b Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Mon, 3 Mar 2025 06:07:52 +0400 Subject: [PATCH] =?UTF-8?q?pman:=20am=C3=A9liorer=20l'ergonomie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash/src/pman.sh | 10 +++-- bin/pdev | 44 ++++++++++++---------- bin/pman | 98 +++++++++++++++++++++++++++++++++++------------- bin/prel | 28 +++++++------- 4 files changed, 116 insertions(+), 64 deletions(-) diff --git a/bash/src/pman.sh b/bash/src/pman.sh index dcd9dfb..93bd6ce 100644 --- a/bash/src/pman.sh +++ b/bash/src/pman.sh @@ -224,13 +224,15 @@ function load_config() { if [ -n "$ConfigFile" ]; then source "$ConfigFile" || die || return elif [ -n "$ConfigBranch" ]; then + # c'est le seul cas où ConfigFile reste vide if ! array_contains LocalBranches "$ConfigBranch"; then die "$ConfigBranch: branche de configuration introuvable" || return else - ac_set_tmpfile ConfigFile - git show "$ConfigBranch:.pman.conf" >"$ConfigFile" 2>/dev/null - [ -s "$ConfigFile" ] || die "$ConfigBranch: aucune configuration trouvée sur cette branche" || return - source "$ConfigFile" + local config + ac_set_tmpfile config + git show "$ConfigBranch:.pman.conf" >"$config" 2>/dev/null + [ -s "$config" ] || die "$ConfigBranch: aucune configuration trouvée sur cette branche" || return + source "$config" fi elif [ -f .pman.conf ]; then ConfigFile="$(pwd)/.pman.conf" diff --git a/bin/pdev b/bin/pdev index 6a2f5d1..8424508 100755 --- a/bin/pdev +++ b/bin/pdev @@ -25,6 +25,9 @@ function ensure_branches() { } function merge_action() { + [ -z "$ShouldPush" ] && enote "\ +L'option --no-push a été forcée puisque ce dépôt n'a pas d'origine" + enote "\ Ce script va - fusionner la branche ${COULEUR_BLEUE}$SrcBranch${COULEUR_NORMALE} dans ${COULEUR_ROUGE}$DestBranch${COULEUR_NORMALE}${Push:+ @@ -54,7 +57,7 @@ EOF fi EOF - if [ -z "$ForbidDelete" ]; then + if [ -n "$ShouldDelete" ]; then _scripta <