summaryrefslogtreecommitdiff
path: root/date.c
diff options
context:
space:
mode:
authorJohan Sageryd <j416@1616.se>2009-10-03 04:20:18 (GMT)
committerJeff King <peff@peff.net>2009-10-03 10:04:38 (GMT)
commitdbc1b1f71052c084a84b5c395e1cb4b5ae526fcb (patch)
tree6902dd23d4cec1554fd21be5ed5bf2e3cfee08e4 /date.c
parentb4ae5e2ac4651097d0f2916f8e566f955a8fa586 (diff)
downloadgit-dbc1b1f71052c084a84b5c395e1cb4b5ae526fcb.zip
git-dbc1b1f71052c084a84b5c395e1cb4b5ae526fcb.tar.gz
git-dbc1b1f71052c084a84b5c395e1cb4b5ae526fcb.tar.bz2
Fix '--relative-date'
This fixes '--relative-date' so that it does not give '0 year, 12 months', for the interval 360 <= diff < 365. Signed-off-by: Johan Sageryd <j416@1616.se> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'date.c')
-rw-r--r--date.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/date.c b/date.c
index e9ee4aa..5d05ef6 100644
--- a/date.c
+++ b/date.c
@@ -123,7 +123,7 @@ const char *show_date_relative(unsigned long time, int tz,
return timebuf;
}
/* Say months for the past 12 months or so */
- if (diff < 360) {
+ if (diff < 365) {
snprintf(timebuf, timebuf_size, "%lu months ago", (diff + 15) / 30);
return timebuf;
}