git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: christian.couder@gmail.com, johannes.schindelin@gmx.de, peff@peff.net
Subject: [PATCH 1/2] builtin/commit: use timestamp_t in parse_force_date
Date: Mon, 12 Nov 2018 00:40:30 -0800	[thread overview]
Message-ID: <20181112084031.11769-2-carenas@gmail.com> (raw)
In-Reply-To: <20181112084031.11769-1-carenas@gmail.com>

when dddbad728c ("timestamp_t: a new data type for timestamps", 2017-04-26)
was introduced, the fallback to use approxidate that was introduced in
14ac2864dc ("commit: accept more date formats for "--date"", 2014-05-01)
was not updated to use the new type instead of unsigned long.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 builtin/commit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/commit.c b/builtin/commit.c
index 0d9828e29e..a447e08f62 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -537,10 +537,10 @@ static int parse_force_date(const char *in, struct strbuf *out)
 
 	if (parse_date(in, out) < 0) {
 		int errors = 0;
-		unsigned long t = approxidate_careful(in, &errors);
+		timestamp_t t = approxidate_careful(in, &errors);
 		if (errors)
 			return -1;
-		strbuf_addf(out, "%lu", t);
+		strbuf_addf(out, "%"PRItime, t);
 	}
 
 	return 0;
-- 
2.19.1.856.g8858448bb


  reply	other threads:[~2018-11-12  8:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  8:40 [PATCH 0/2] avoid unsigned long for timestamps Carlo Marcelo Arenas Belón
2018-11-12  8:40 ` Carlo Marcelo Arenas Belón [this message]
2018-11-12  8:40 ` [PATCH 2/2] read-cache: use time_t instead of unsigned long Carlo Marcelo Arenas Belón
2018-11-12  8:42   ` Eric Sunshine
2018-11-12 10:53   ` Junio C Hamano
2018-11-12 14:54     ` Johannes Schindelin
2018-11-12 15:03       ` Junio C Hamano
2018-11-13  7:40         ` Carlo Marcelo Arenas Belón
2018-11-13  8:49           ` Johannes Schindelin
2018-11-13  9:10             ` Carlo Arenas
2018-11-13  9:43           ` Junio C Hamano
2018-11-12 12:06 ` [PATCH 0/2] avoid unsigned long for timestamps Johannes Schindelin

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20181112084031.11769-2-carenas@gmail.com \
    --to=carenas@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).