{"thread":{"id":"15430","subject":"[PATCH (GIT-GUI FIX)] git-gui: Restore ability to Stage Working Copy for conflicts.","startedAt":"2008-09-08T16:37:11Z","lastAt":"2008-09-09T06:18:40Z","messageCount":2,"participants":["Alexander Gavrilov","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"90103","messageId":"200809082037.12173.angavrilov@gmail.com","threadId":"15430","inReplyTo":null,"subject":"[PATCH (GIT-GUI FIX)] git-gui: Restore ability to Stage Working Copy for conflicts.","fromName":"Alexander Gavrilov","fromEmail":"angavrilov@gmail.com","sentAt":"2008-09-08T16:37:11Z","receivedAt":"2008-09-08T16:37:11Z","isPatch":true,"sender":{"key":"angavrilov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42666?v=4"},"body":"Tools like rerere leave files marked as conflicts in the index,\nwhile actually resolving them in the working copy. Also, some\npeople like to use an external editor to resolve conflicts.\n\nThis patch restores functionality previously removed in\ncommit 617ceee653 by adding a new context menu item.\nIt still ensures that the user does not stage conflicting files\naccidentally by clicking on the icon instead of the name.\n\nSigned-off-by: Alexander Gavrilov <angavrilov@gmail.com>\n---\n git-gui.sh        |    5 +++++\n lib/mergetool.tcl |    6 ++++++\n 2 files changed, 11 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex d227eca..a732ef1 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -2984,6 +2984,11 @@ $ctxmmg add command \\\n \t-command {merge_resolve_one 1}\n lappend diff_actions [list $ctxmmg entryconf [$ctxmmg index last] -state]\n $ctxmmg add separator\n+$ctxmmg add command \\\n+\t-label [mc \"Stage Working Copy\"] \\\n+\t-command {merge_resolve_one 0}\n+lappend diff_actions [list $ctxmmg entryconf [$ctxmmg index last] -state]\n+$ctxmmg add separator\n create_common_diff_popup $ctxmmg\n \n proc popup_diff_menu {ctxm ctxmmg x y X Y} {\ndiff --git a/lib/mergetool.tcl b/lib/mergetool.tcl\nindex 79c58bc..dd2315b 100644\n--- a/lib/mergetool.tcl\n+++ b/lib/mergetool.tcl\n@@ -5,6 +5,12 @@ proc merge_resolve_one {stage} {\n \tglobal current_diff_path\n \n \tswitch -- $stage {\n+\t\t0 {\t# Stage without confirmation, to minimize\n+\t\t\t# disruption of the rerere workflow\n+\t\t\tmerge_add_resolution $current_diff_path\n+\t\t\treturn\n+\t\t}\n+\n \t\t1 { set target [mc \"the base version\"] }\n \t\t2 { set target [mc \"this branch\"] }\n \t\t3 { set target [mc \"the other branch\"] }\n-- \n1.6.0.20.g6148bc\n"},{"id":"90168","messageId":"48C61540.8070300@viscovery.net","threadId":"15430","inReplyTo":"200809082037.12173.angavrilov@gmail.com","subject":"Re: [PATCH (GIT-GUI FIX)] git-gui: Restore ability to Stage Working Copy for conflicts.","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-09-09T06:18:40Z","receivedAt":"2008-09-09T06:18:40Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Alexander Gavrilov schrieb:\n> Tools like rerere leave files marked as conflicts in the index,\n> while actually resolving them in the working copy. Also, some\n> people like to use an external editor to resolve conflicts.\n> \n> This patch restores functionality previously removed in\n> commit 617ceee653 by adding a new context menu item.\n> It still ensures that the user does not stage conflicting files\n> accidentally by clicking on the icon instead of the name.\n\nThanks! Works well here.\n\nTested-by: Johannes Sixt <johannes.sixt@telecom.at>\n\n-- Hannes\n"}]}