Linus Torvalds <torva...@linux-foundation.org> writes:

> On Wed, Apr 15, 2015 at 12:22 AM, Eric Sunshine <sunsh...@sunshineco.com> 
> wrote:
>>
>> The fix seems to be simply:
>
> Yup, that seems to do it for me. I'm not sure how we get to
> "match_digit()" with the time string "now", though.

The --date=<when> parameter is read by determine_author_info() and
then parse_force_date(), both in builtin/commit.c.  This calls
parse_date(), which first calls (and fails) parse_date_basic() when
it is not a strict timestamp.

"now", "4.days.ago", etc. are then passed to approxidate_careful()
which in turn calls approxidate_str().  Note that the approxidate
formats do not usually spell out the TZ offset.  The result is
turned into "@<numseconds>" by parse_force_date().

The string "@<numseconds>" without TZ offset is re-interpreted by
parse_date() called by fmt_ident(); the last function prepares the
author ident line "Name <email> <numseconds> <offset>".

The --date=<when> does not force committer information, which goes
through the usual codepath of grabbing the "current" time.




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to