summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-18 00:16:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-18 00:16:41 (GMT)
commit0220f1ebdee113e02031de0dba2d5e2c8623d6bb (patch)
treed4f4dca1c3412c7667dd1d2de8e18ee7d45da743
parentc284914a7c6646ddf999d3df7924b10f06ac6979 (diff)
parentf6f2aa39ef97cae03c71ecfecc334f0df60d7920 (diff)
downloadgit-0220f1ebdee113e02031de0dba2d5e2c8623d6bb.zip
git-0220f1ebdee113e02031de0dba2d5e2c8623d6bb.tar.gz
git-0220f1ebdee113e02031de0dba2d5e2c8623d6bb.tar.bz2
Merge branch 'maint' of git://repo.or.cz/git-gui into maint
* 'maint' of git://repo.or.cz/git-gui: git-gui: Brown paper bag fix division by 0 in blame
-rwxr-xr-xgit-gui/git-gui.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 60e79ca..7cbc977 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -3604,12 +3604,14 @@ proc read_blame_incremental {fd w w_load w_cmit w_line w_file} {
proc blame_incremental_status {w} {
global blame_status blame_data
+ set have $blame_data($w,blame_lines)
+ set total $blame_data($w,total_lines)
+ set pdone 0
+ if {$total} {set pdone [expr {100 * $have / $total}]}
+
set blame_status($w) [format \
"Loading annotations... %i of %i lines annotated (%2i%%)" \
- $blame_data($w,blame_lines) \
- $blame_data($w,total_lines) \
- [expr {100 * $blame_data($w,blame_lines)
- / $blame_data($w,total_lines)}]]
+ $have $total $pdone]
}
proc blame_click {w w_cmit w_line w_file cur_w pos} {