All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Alexander Gavrilov <angavrilov@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] git-gui: Do not automatically stage file after merge tool finishes
Date: Tue, 30 Sep 2008 08:43:11 +0200	[thread overview]
Message-ID: <48E1CA7F.5050501@viscovery.net> (raw)

From: Johannes Sixt <johannes.sixt@telecom.at>

If a merge tool was invoked on a conflicted file and the tool completed,
then the conflicted file was staged automatically. However, the fact that
the user closed the merge tool cannot be understood as the unequivocal
sign that the conflict was completely resolved. For example, the user
could have decided to postpone the resolution of the conflict, or could
have accidentally closed the tool. We better leave the file unstaged and
let the user stage it explicitly.

Since the file is not staged anyway, the check for an unmodified
timestamp is pointless and removed.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 I had sent this patch last week (but marked as RFC). Here it is again
 without 'RFC' because I think it is a necessary change.

 -- Hannes

 lib/mergetool.tcl |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/lib/mergetool.tcl b/lib/mergetool.tcl
index 6ab5701..8d1ee5b 100644
--- a/lib/mergetool.tcl
+++ b/lib/mergetool.tcl
@@ -375,14 +375,6 @@ proc merge_tool_finish {fd} {
 		}
 	}

-	# Check the modification time of the target file
-	if {!$failed && [file mtime $mtool_target] eq $mtool_mtime} {
-		if {[ask_popup [mc "File %s unchanged, still accept as resolved?" \
-				[short_path $mtool_target]]] ne {yes}} {
-			set failed 1
-		}
-	}
-
 	# Finish
 	if {$failed} {
 		file rename -force -- $backup $mtool_target
@@ -395,6 +387,6 @@ proc merge_tool_finish {fd} {

 		delete_temp_files $mtool_tmpfiles

-		merge_add_resolution $mtool_target
+		reshow_diff
 	}
 }
-- 
1.6.0.2.1262.ge466e

             reply	other threads:[~2008-09-30  6:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-30  6:43 Johannes Sixt [this message]
2008-09-30  8:00 ` [PATCH] git-gui: Do not automatically stage file after merge tool finishes Alexander Gavrilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48E1CA7F.5050501@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=angavrilov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.