git-gui: Make Ctrl-T safe to use for conflicting files.
A previous patch added a check for conflict markers, which is done when the file is about to be staged due to a click on the icon. However, pressing Ctrl-T still immediately stages the file without confirmation. This patch fixes it. The check requires a loaded diff, so staging multiple files at once won't work if they are unmerged. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:

committed by
Shawn O. Pearce

parent
d3bcf55d67
commit
0aea2842d9
@ -23,13 +23,14 @@ This operation can be undone only by restarting the merge." \
|
||||
}
|
||||
}
|
||||
|
||||
proc merge_stage_workdir {path w lno} {
|
||||
proc merge_stage_workdir {path {lno {}}} {
|
||||
global current_diff_path diff_active
|
||||
global current_diff_side ui_workdir
|
||||
|
||||
if {$diff_active} return
|
||||
|
||||
if {$path ne $current_diff_path} {
|
||||
show_diff $path $w $lno {} [list do_merge_stage_workdir $path]
|
||||
if {$path ne $current_diff_path || $ui_workdir ne $current_diff_side} {
|
||||
show_diff $path $ui_workdir $lno {} [list do_merge_stage_workdir $path]
|
||||
} else {
|
||||
do_merge_stage_workdir $path
|
||||
}
|
||||
|
Reference in New Issue
Block a user