summaryrefslogtreecommitdiff
path: root/git-gui/lib
diff options
context:
space:
mode:
Diffstat (limited to 'git-gui/lib')
-rw-r--r--git-gui/lib/commit.tcl2
-rw-r--r--git-gui/lib/console.tcl2
-rw-r--r--git-gui/lib/status_bar.tcl5
3 files changed, 6 insertions, 3 deletions
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
index f857a2ff5b..57238129e4 100644
--- a/git-gui/lib/commit.tcl
+++ b/git-gui/lib/commit.tcl
@@ -253,7 +253,7 @@ proc commit_committree {fd_wt curHEAD msg} {
global repo_config
gets $fd_wt tree_id
- if {$tree_id eq {} || [catch {close $fd_wt} err]} {
+ if {[catch {close $fd_wt} err]} {
error_popup "write-tree failed:\n\n$err"
ui_status {Commit failed.}
unlock_index
diff --git a/git-gui/lib/console.tcl b/git-gui/lib/console.tcl
index 6f718fbac3..b038a78358 100644
--- a/git-gui/lib/console.tcl
+++ b/git-gui/lib/console.tcl
@@ -122,7 +122,7 @@ method _read {fd after} {
} else {
$w.m.t delete $console_cr end
$w.m.t insert end "\n"
- $w.m.t insert end [string range $buf $c $cr]
+ $w.m.t insert end [string range $buf $c [expr {$cr - 1}]]
set c $cr
incr c
}
diff --git a/git-gui/lib/status_bar.tcl b/git-gui/lib/status_bar.tcl
index 72a8fe1fd3..3bf79eb6e0 100644
--- a/git-gui/lib/status_bar.tcl
+++ b/git-gui/lib/status_bar.tcl
@@ -69,7 +69,10 @@ method update_meter {buf} {
set prior [string range $meter 0 $r]
set meter [string range $meter [expr {$r + 1}] end]
- if {[regexp "\\((\\d+)/(\\d+)\\)\\s+done\r\$" $prior _j a b]} {
+ set p "\\((\\d+)/(\\d+)\\)"
+ if {[regexp ":\\s*\\d+% $p\(?:, done.\\s*\n|\\s*\r)\$" $prior _j a b]} {
+ update $this $a $b
+ } elseif {[regexp "$p\\s+done\r\$" $prior _j a b]} {
update $this $a $b
}
}