Git development
 help / color / mirror / Atom feed
From: Johan Sageryd <j416@1616.se>
To: git@vger.kernel.org
Cc: Johan Sageryd <j416@1616.se>
Subject: [PATCH] Fix '--relative-date'
Date: Sat,  3 Oct 2009 13:20:18 +0900	[thread overview]
Message-ID: <1254543618-3772-1-git-send-email-j416@1616.se> (raw)

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>
---
 date.c |    2 +-
 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;
 	}
-- 
1.6.4.4

             reply	other threads:[~2009-10-03  4:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-03  4:20 Johan Sageryd [this message]
2009-10-03 10:06 ` [PATCH] Fix '--relative-date' Jeff King
2009-10-03 11:18   ` Johan Sageryd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1254543618-3772-1-git-send-email-j416@1616.se \
    --to=j416@1616.se \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox