diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/blame.c | 6 | ||||
-rw-r--r-- | builtin/fsck.c | 2 | ||||
-rw-r--r-- | builtin/log.c | 2 | ||||
-rw-r--r-- | builtin/receive-pack.c | 4 | ||||
-rw-r--r-- | builtin/rev-list.c | 2 | ||||
-rw-r--r-- | builtin/rev-parse.c | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 07506a3e45..e4b3c7b0eb 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -1727,11 +1727,11 @@ static int emit_one_suspect_detail(struct origin *suspect, int repeat) get_commit_info(suspect->commit, &ci, 1); printf("author %s\n", ci.author.buf); printf("author-mail %s\n", ci.author_mail.buf); - printf("author-time %lu\n", ci.author_time); + printf("author-time %"PRItime"\n", ci.author_time); printf("author-tz %s\n", ci.author_tz.buf); printf("committer %s\n", ci.committer.buf); printf("committer-mail %s\n", ci.committer_mail.buf); - printf("committer-time %lu\n", ci.committer_time); + printf("committer-time %"PRItime"\n", ci.committer_time); printf("committer-tz %s\n", ci.committer_tz.buf); printf("summary %s\n", ci.summary.buf); if (suspect->commit->object.flags & UNINTERESTING) @@ -1844,7 +1844,7 @@ static const char *format_time(unsigned long time, const char *tz_str, strbuf_reset(&time_buf); if (show_raw_time) { - strbuf_addf(&time_buf, "%lu %s", time, tz_str); + strbuf_addf(&time_buf, "%"PRItime" %s", time, tz_str); } else { const char *time_str; diff --git a/builtin/fsck.c b/builtin/fsck.c index f76e4163ab..af7b985c6e 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -407,7 +407,7 @@ static void fsck_handle_reflog_oid(const char *refname, struct object_id *oid, if (timestamp && name_objects) add_decoration(fsck_walk_options.object_names, obj, - xstrfmt("%s@{%ld}", refname, timestamp)); + xstrfmt("%s@{%"PRItime"}", refname, timestamp)); obj->used = 1; mark_object_reachable(obj); } else { diff --git a/builtin/log.c b/builtin/log.c index b3b10cc1ed..f93ef6c710 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -910,7 +910,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids) static void gen_message_id(struct rev_info *info, char *base) { struct strbuf buf = STRBUF_INIT; - strbuf_addf(&buf, "%s.%lu.git.%s", base, + strbuf_addf(&buf, "%s.%"PRItime".git.%s", base, (unsigned long) time(NULL), git_committer_info(IDENT_NO_NAME|IDENT_NO_DATE|IDENT_STRICT)); info->message_id = strbuf_detach(&buf, NULL); diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 9a4c2a7ade..c49333c9b6 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -459,12 +459,12 @@ static char *prepare_push_cert_nonce(const char *path, unsigned long stamp) struct strbuf buf = STRBUF_INIT; unsigned char sha1[20]; - strbuf_addf(&buf, "%s:%lu", path, stamp); + strbuf_addf(&buf, "%s:%"PRItime, path, stamp); hmac_sha1(sha1, buf.buf, buf.len, cert_nonce_seed, strlen(cert_nonce_seed));; strbuf_release(&buf); /* RFC 2104 5. HMAC-SHA1-80 */ - strbuf_addf(&buf, "%lu-%.*s", stamp, 20, sha1_to_hex(sha1)); + strbuf_addf(&buf, "%"PRItime"-%.*s", stamp, 20, sha1_to_hex(sha1)); return strbuf_detach(&buf, NULL); } diff --git a/builtin/rev-list.c b/builtin/rev-list.c index bcf77f0b8a..3b292c99bd 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -80,7 +80,7 @@ static void show_commit(struct commit *commit, void *data) } if (info->show_timestamp) - printf("%lu ", commit->date); + printf("%"PRItime" ", commit->date); if (info->header_prefix) fputs(info->header_prefix, stdout); diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 0513330910..b450900243 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -218,7 +218,7 @@ static void show_datestring(const char *flag, const char *datestr) /* date handling requires both flags and revs */ if ((filter & (DO_FLAGS | DO_REVS)) != (DO_FLAGS | DO_REVS)) return; - buffer = xstrfmt("%s%lu", flag, approxidate(datestr)); + buffer = xstrfmt("%s%"PRItime, flag, approxidate(datestr)); show(buffer); free(buffer); } |