diff options
| author | Pratyush Yadav <me@yadavpratyush.com> | 2019-12-06 00:25:27 +0530 |
|---|---|---|
| committer | Pratyush Yadav <me@yadavpratyush.com> | 2019-12-06 00:40:55 +0530 |
| commit | 276353004822918d1f45cfc36d0717b878fff600 (patch) | |
| tree | 6a1ac62bd5b56df6a8c4020c0d0ac19751ff09a4 /lib/merge.tcl | |
| parent | b524f6b399c77b40c8bf2b6217585fde4731472a (diff) | |
| parent | fa38ab68b0ac409f695efcaa23b8bcda84defd41 (diff) | |
| download | git-276353004822918d1f45cfc36d0717b878fff600.tar.gz | |
Merge branch 'jg/revert-untracked'
git-gui learned to delete untracked files when the "Revert Changes"
option is selected. Since there are two types of revert operations (one
for tracked files and one for untracked ones), the "checkout" and
"deletion" operations are done in parallel. The status bar is updated
to allow both to use it in parallel.
* jg/revert-untracked:
git-gui: revert untracked files by deleting them
git-gui: update status bar to track operations
git-gui: consolidate naming conventions
Diffstat (limited to 'lib/merge.tcl')
| -rw-r--r-- | lib/merge.tcl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/merge.tcl b/lib/merge.tcl index 9f253db5b3..8df8ffae55 100644 --- a/lib/merge.tcl +++ b/lib/merge.tcl @@ -241,23 +241,27 @@ Continue with resetting the current changes?"] if {[ask_popup $op_question] eq {yes}} { 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]] - $::main_status start [mc "Aborting"] [mc "files reset"] + set status_bar_operation [$::main_status \ + start \ + [mc "Aborting"] \ + [mc "files reset"] + fileevent $fd readable [namespace code [list \ + _reset_wait $fd $status_bar_operation]] } else { unlock_index } } -proc _reset_wait {fd} { +proc _reset_wait {fd status_bar_operation} { global ui_comm - $::main_status update_meter [read $fd] + $status_bar_operation update_meter [read $fd] fconfigure $fd -blocking 1 if {[eof $fd]} { set fail [catch {close $fd} err] - $::main_status stop unlock_index + $status_bar_operation stop $ui_comm delete 0.0 end $ui_comm edit modified false |
