From 340a55e68533d4be5a66ed6b56ba5e4b43c81ad1 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sun, 22 Mar 2026 22:21:16 -0400 Subject: [PATCH] [IMP] todo: git patch --- script/todo/todo.json | 4 ++++ script/todo/todo_i18n.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/script/todo/todo.json b/script/todo/todo.json index 27255b0..5a052f9 100644 --- a/script/todo/todo.json +++ b/script/todo/todo.json @@ -56,6 +56,10 @@ { "prompt_description_key": "Configure git local editor to vim", "bash_command": "git config --global core.editor \"vim\"" + }, + { + "prompt_description_key": "Generate git patch to /tmp", + "bash_command": "PATCH=\"/tmp/patch_$(date +%Y%m%d_%H%M%S).patch\"; git -C \"$(pwd)\" diff HEAD > \"$PATCH\" && printf \"\\n✓ Patch created: %s\\n\\n=== Guide to apply the patch ===\\n Check compatibility : git apply --check %s\\n Apply (git) : git apply %s\\n Apply (patch) : patch -p1 < %s\\n Revert (git) : git apply -R %s\\n\" \"$PATCH\" \"$PATCH\" \"$PATCH\" \"$PATCH\" \"$PATCH\"" } ] } diff --git a/script/todo/todo_i18n.py b/script/todo/todo_i18n.py index 1e9846e..ec9ace0 100644 --- a/script/todo/todo_i18n.py +++ b/script/todo/todo_i18n.py @@ -617,6 +617,10 @@ TRANSLATIONS = { "fr": "Configuration git local par vim", "en": "Configure git local editor to vim", }, + "Generate git patch to /tmp": { + "fr": "Générer une patch git dans /tmp", + "en": "Generate git patch to /tmp", + }, "Git editor configured to vim successfully!": { "fr": "Éditeur git configuré sur vim avec succès!", "en": "Git editor configured to vim successfully!",