summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-10-20 18:16:15 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-21 00:36:27 (GMT)
commitbea6878be2fb73e50407f93f2bcd71b961510c19 (patch)
treebf5fdfe2f52e7b704badb02801cac5faa4f89388 /lib
parent8af52d7a83a78c5f3a60d5bd5099a5073655339a (diff)
downloadgit-bea6878be2fb73e50407f93f2bcd71b961510c19.zip
git-bea6878be2fb73e50407f93f2bcd71b961510c19.tar.gz
git-bea6878be2fb73e50407f93f2bcd71b961510c19.tar.bz2
git-gui: Handle progress bars from newer gits
Post Git 1.5.3 a new style progress bar has been introduced that uses only one line rather than two. The formatting of the completed and total section is also slightly different so we must adjust our regexp to match. Unfortunately both styles are in active use by different versions of Git so we need to look for both. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/status_bar.tcl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/status_bar.tcl b/lib/status_bar.tcl
index 72a8fe1..3bf79eb 100644
--- a/lib/status_bar.tcl
+++ b/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
}
}