summaryrefslogtreecommitdiff
path: root/git-format-patch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-22 02:13:32 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-22 02:13:32 (GMT)
commitfab5de7936f0cc086836a38d2de4374c3df223b4 (patch)
treed07d397cd9da04a56718dbbd66b410a5f72a4aca /git-format-patch.sh
parent60ace8790f3cfba4fdc16e71e23c4f9c44ce9b44 (diff)
downloadgit-fab5de7936f0cc086836a38d2de4374c3df223b4.zip
git-fab5de7936f0cc086836a38d2de4374c3df223b4.tar.gz
git-fab5de7936f0cc086836a38d2de4374c3df223b4.tar.bz2
format-patch: pretty-print timestamp correctly.
Perl is not C and does not truncate the division result. Arghh! Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-format-patch.sh')
-rwxr-xr-xgit-format-patch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-format-patch.sh b/git-format-patch.sh
index e54c9e4..eb75de4 100755
--- a/git-format-patch.sh
+++ b/git-format-patch.sh
@@ -189,7 +189,7 @@ my @month_names = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
sub show_date {
my ($time, $tz) = @_;
my $minutes = abs($tz);
- $minutes = ($minutes / 100) * 60 + ($minutes % 100);
+ $minutes = int($minutes / 100) * 60 + ($minutes % 100);
if ($tz < 0) {
$minutes = -$minutes;
}