Skip to content

Commit

Permalink
git-gui: Do not automatically stage file after merge tool finishes
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Johannes Sixt authored and Shawn O. Pearce committed Sep 30, 2008
1 parent ed70e4d commit d3bcf55
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/mergetool.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -395,6 +387,6 @@ proc merge_tool_finish {fd} {

delete_temp_files $mtool_tmpfiles

merge_add_resolution $mtool_target
reshow_diff
}
}

0 comments on commit d3bcf55

Please sign in to comment.