Commit f6f2aa3
committed
git-gui: Brown paper bag fix division by 0 in blame
If we generate a blame status string before we have obtained
any annotation data at all from the input file, or if the input
file is empty, our total_lines will be 0. This causes a division
by 0 error when we blindly divide by the 0 to compute the total
percentage of lines loaded. Instead we should report 0% done.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>1 parent 2ec0cb7 commit f6f2aa3
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3604 | 3604 | | |
3605 | 3605 | | |
3606 | 3606 | | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
3607 | 3612 | | |
3608 | 3613 | | |
3609 | | - | |
3610 | | - | |
3611 | | - | |
3612 | | - | |
| 3614 | + | |
3613 | 3615 | | |
3614 | 3616 | | |
3615 | 3617 | | |
| |||
0 commit comments