{"thread":{"id":"15717","subject":"[PATCH] git-gui: Do not automatically stage file after merge tool finishes","startedAt":"2008-09-30T06:43:11Z","lastAt":"2008-09-30T08:00:57Z","messageCount":2,"participants":["Johannes Sixt","Alexander Gavrilov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"91897","messageId":"48E1CA7F.5050501@viscovery.net","threadId":"15717","inReplyTo":null,"subject":"[PATCH] git-gui: Do not automatically stage file after merge tool finishes","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-09-30T06:43:11Z","receivedAt":"2008-09-30T06:43:11Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <johannes.sixt@telecom.at>\n\nIf a merge tool was invoked on a conflicted file and the tool completed,\nthen the conflicted file was staged automatically. However, the fact that\nthe user closed the merge tool cannot be understood as the unequivocal\nsign that the conflict was completely resolved. For example, the user\ncould have decided to postpone the resolution of the conflict, or could\nhave accidentally closed the tool. We better leave the file unstaged and\nlet the user stage it explicitly.\n\nSince the file is not staged anyway, the check for an unmodified\ntimestamp is pointless and removed.\n\nSigned-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n I had sent this patch last week (but marked as RFC). Here it is again\n without 'RFC' because I think it is a necessary change.\n\n -- Hannes\n\n lib/mergetool.tcl |   10 +---------\n 1 files changed, 1 insertions(+), 9 deletions(-)\n\ndiff --git a/lib/mergetool.tcl b/lib/mergetool.tcl\nindex 6ab5701..8d1ee5b 100644\n--- a/lib/mergetool.tcl\n+++ b/lib/mergetool.tcl\n@@ -375,14 +375,6 @@ proc merge_tool_finish {fd} {\n \t\t}\n \t}\n\n-\t# Check the modification time of the target file\n-\tif {!$failed && [file mtime $mtool_target] eq $mtool_mtime} {\n-\t\tif {[ask_popup [mc \"File %s unchanged, still accept as resolved?\" \\\n-\t\t\t\t[short_path $mtool_target]]] ne {yes}} {\n-\t\t\tset failed 1\n-\t\t}\n-\t}\n-\n \t# Finish\n \tif {$failed} {\n \t\tfile rename -force -- $backup $mtool_target\n@@ -395,6 +387,6 @@ proc merge_tool_finish {fd} {\n\n \t\tdelete_temp_files $mtool_tmpfiles\n\n-\t\tmerge_add_resolution $mtool_target\n+\t\treshow_diff\n \t}\n }\n-- \n1.6.0.2.1262.ge466e\n"},{"id":"91905","messageId":"200809301200.57353.angavrilov@gmail.com","threadId":"15717","inReplyTo":"48E1CA7F.5050501@viscovery.net","subject":"Re: [PATCH] git-gui: Do not automatically stage file after merge tool finishes","fromName":"Alexander Gavrilov","fromEmail":"angavrilov@gmail.com","sentAt":"2008-09-30T08:00:57Z","receivedAt":"2008-09-30T08:00:57Z","isPatch":true,"sender":{"key":"angavrilov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42666?v=4"},"body":"On Tuesday 30 September 2008 10:43:11 Johannes Sixt wrote:\n> From: Johannes Sixt <johannes.sixt@telecom.at>\n> \n> If a merge tool was invoked on a conflicted file and the tool completed,\n> then the conflicted file was staged automatically. However, the fact that\n> the user closed the merge tool cannot be understood as the unequivocal\n> sign that the conflict was completely resolved. For example, the user\n> could have decided to postpone the resolution of the conflict, or could\n> have accidentally closed the tool. We better leave the file unstaged and\n> let the user stage it explicitly.\n> \n> Since the file is not staged anyway, the check for an unmodified\n> timestamp is pointless and removed.\n> \n> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n> ---\n>  I had sent this patch last week (but marked as RFC). Here it is again\n>  without 'RFC' because I think it is a necessary change.\n\nNow that the issue with staging of working copy files is more or less\nresolved, I agree that it is better to disable automatic staging.\n\nAlexander\n"}]}