set spec [$w_rev get_tracking_branch]
set cmit [$w_rev get_commit]
- set cmd [list git]
- lappend cmd merge
- lappend cmd --strategy=recursive
set fh [open [gitdir FETCH_HEAD] w]
fconfigure $fh -translation lf
puts $fh "$cmit\t\tbranch '$branch' of $remote"
close $fh
+ set cmd [list git]
+ lappend cmd merge
+ lappend cmd --strategy=recursive
lappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]
lappend cmd HEAD
- lappend cmd $cmit
+ lappend cmd $name
set msg "Merging $current_branch and $stitle"
ui_status "$msg..."
}
if {[ask_popup $op_question] eq {yes}} {
- set fd [git_read read-tree --reset -u HEAD]
+ set fd [git_read --stderr read-tree --reset -u -v HEAD]
fconfigure $fd -blocking 0 -translation binary
fileevent $fd readable [namespace code [list _reset_wait $fd]]
- ui_status {Aborting... please wait...}
+ $::main_status start {Aborting} {files reset}
} else {
unlock_index
}
proc _reset_wait {fd} {
global ui_comm
- read $fd
+ $::main_status update_meter [read $fd]
+
+ fconfigure $fd -blocking 1
if {[eof $fd]} {
- close $fd
+ set fail [catch {close $fd} err]
+ $::main_status stop
unlock_index
$ui_comm delete 0.0 end
catch {file delete [gitdir MERGE_MSG]}
catch {file delete [gitdir GITGUI_MSG]}
+ if {$fail} {
+ warn_popup "Abort failed.\n\n$err"
+ }
rescan {ui_status {Abort completed. Ready.}}
+ } else {
+ fconfigure $fd -blocking 0
}
}