1420 |
1420 |
1421 for filename, adds, removes in stats: |
1421 for filename, adds, removes in stats: |
1422 # If diffstat runs out of room it doesn't print anything, which |
1422 # If diffstat runs out of room it doesn't print anything, which |
1423 # isn't very useful, so always print at least one + or - if there |
1423 # isn't very useful, so always print at least one + or - if there |
1424 # were at least some changes |
1424 # were at least some changes |
1425 pluses = '+' * max(adds/factor, int(bool(adds))) |
1425 pluses = '+' * max(adds // factor, int(bool(adds))) |
1426 minuses = '-' * max(removes/factor, int(bool(removes))) |
1426 minuses = '-' * max(removes // factor, int(bool(removes))) |
1427 output.append(' %-*s | %*.d %s%s\n' % (maxname, filename, countwidth, |
1427 output.append(' %-*s | %*.d %s%s\n' % (maxname, filename, countwidth, |
1428 adds+removes, pluses, minuses)) |
1428 adds+removes, pluses, minuses)) |
1429 |
1429 |
1430 if stats: |
1430 if stats: |
1431 output.append(' %d files changed, %d insertions(+), %d deletions(-)\n' |
1431 output.append(' %d files changed, %d insertions(+), %d deletions(-)\n' |