From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Phil Pennock <phil@pennock-tech•com>,
Theodore Ts'o <tytso@mit•edu>,
git@vger•kernel.org,
Johannes Schindelin <johannes.schindelin@gmx•de>
Subject: Re: [PATCH] pretty format string support for reflog times
Date: Wed, 27 Jul 2016 10:46:48 -0700 [thread overview]
Message-ID: <xmqqk2g7vurb.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqwpk7vw30.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Wed, 27 Jul 2016 10:18:11 -0700")
Junio C Hamano <gitster@pobox•com> writes:
>> Hrm. Since Ted was not cc'd, it is not clear to me whether this is
>> coincidental or in response to the thread over in
>>
>> http://thread.gmane.org/gmane.comp.version-control.git/299201
>>
>> To summarize, I think the conclusion there was that we would go with at
>> least the 't' and 'r' formatters in the short term. The 'i/I' ones were
>> not something Ted cared about that much, I think, but they do make
>> things orthogonal with the other ident dates.
>
> I forgot about that thread after it stalled without drawing
> conclusion, after Ted asked if anybody has a strong opinion
> and saw only one response to it at
>
> https://public-inbox.org/git/20160711164317.GB3890%40thunk.org/
>
> So, what is the next step? Apply
>
> https://public-inbox.org/git/20160710055402.32684-1-tytso%40mit.edu/
>
> but exclude %g[iI] bits out of that patch while doing so?
FWIW, a squash to do so is trivial, but the original had two
compiler breakers.
I am not sure about the latter, i.e. the return value from the
get_reflog_time_t() function (which I think is misnamed, in that the
function returns "unsigned long", not "time_t", and should be
renamed to get_reflog_time()) uses the epoch as a fallback value.
reflog-walk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/reflog-walk.c b/reflog-walk.c
index d0aa2d0..51bfe29 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -309,7 +309,7 @@ void get_reflog_message(struct strbuf *sb,
size_t len;
if (!info)
- return NULL;
+ return;
len = strlen(info->message);
if (len > 0)
len--; /* strip away trailing newline */
@@ -330,7 +330,7 @@ unsigned long get_reflog_time_t(struct reflog_walk_info *reflog_info)
struct reflog_info *info = get_reflog_info(reflog_info);
if (!info)
- return NULL;
+ return 0;
return gm_time_t(info->timestamp, info->tz);
}
next prev parent reply other threads:[~2016-07-27 17:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 8:14 [PATCH] pretty format string support for reflog times Phil Pennock
2016-07-27 12:02 ` Phil Pennock
2016-07-27 13:58 ` Jeff King
2016-07-27 14:17 ` Phil Pennock
2016-07-27 17:18 ` Junio C Hamano
2016-07-27 17:39 ` Jeff King
2016-07-27 18:09 ` Junio C Hamano
2016-07-27 18:17 ` Jeff King
2016-07-27 17:46 ` Junio C Hamano [this message]
2016-07-27 17:58 ` Jeff King
2016-07-27 17:56 ` Jeff King
2016-07-27 18:13 ` Phil Pennock
2016-07-27 18:32 ` Jeff King
2016-07-27 18:41 ` Phil Pennock
2016-07-27 19:16 ` Jeff King
2016-07-27 18:52 ` [PATCH 0/2] t4205 style fixes Jeff King
2016-07-27 18:55 ` [PATCH 1/2] t4205: drop top-level &&-chaining Jeff King
2016-07-27 18:55 ` [PATCH 2/2] t4205: indent here documents Jeff King
2016-07-27 19:28 ` Junio C Hamano
2016-07-27 19:57 ` Jeff King
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=xmqqk2g7vurb.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=johannes.schindelin@gmx$(echo .)de \
--cc=peff@peff$(echo .)net \
--cc=phil@pennock-tech$(echo .)com \
--cc=tytso@mit$(echo .)edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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