<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/date.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-04-17T18:03:28Z</updated>
<entry>
<title>i18n: fix uncatchable comments for translators in date.c</title>
<updated>2014-04-17T18:03:28Z</updated>
<author>
<name>Jiang Xin</name>
<email>worldhello.net@gmail.com</email>
</author>
<published>2014-04-17T05:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fcaed04df693685dfece4a48cc8780c9a5adde0b'/>
<id>urn:sha1:fcaed04df693685dfece4a48cc8780c9a5adde0b</id>
<content type='text'>
Comment for l10n translators can not be extracted by xgettext if it
is not right above the l10n tag.  Moving the comment right before
the l10n tag will fix this issue.

Reported-by: Brian Gesiak &lt;modocache@gmail.com&gt;
Signed-off-by: Jiang Xin &lt;worldhello.net@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/commit-dates-parsing-fix'</title>
<updated>2014-03-14T21:25:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-14T21:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3c83b080e4dce42d0f48d28b03691ae1ac0dcde3'/>
<id>urn:sha1:3c83b080e4dce42d0f48d28b03691ae1ac0dcde3</id>
<content type='text'>
Tighten codepaths that parse timestamps in commit objects.

* jk/commit-dates-parsing-fix:
  show_ident_date: fix tz range check
  log: do not segfault on gmtime errors
  log: handle integer overflow in timestamps
  date: check date overflow against time_t
  fsck: report integer overflow in author timestamps
  t4212: test bogus timestamps with git-log
</content>
</entry>
<entry>
<title>log: do not segfault on gmtime errors</title>
<updated>2014-02-24T18:12:58Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-02-24T07:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b15846dbfb31df10a69a4d56ae944a01563bc07'/>
<id>urn:sha1:2b15846dbfb31df10a69a4d56ae944a01563bc07</id>
<content type='text'>
Many code paths assume that show_date and show_ident_date
cannot return NULL. For the most part, we handle missing or
corrupt timestamps by showing the epoch time t=0.

However, we might still return NULL if gmtime rejects the
time_t we feed it, resulting in a segfault. Let's catch this
case and just format t=0.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>date: check date overflow against time_t</title>
<updated>2014-02-24T18:12:58Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-02-24T07:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ca36d9398a85e7974d04f8fbd2c6adb088290e1'/>
<id>urn:sha1:7ca36d9398a85e7974d04f8fbd2c6adb088290e1</id>
<content type='text'>
When we check whether a timestamp has overflowed, we check
only against ULONG_MAX, meaning that strtoul has overflowed.
However, we also feed these timestamps to system functions
like gmtime, which expect a time_t. On many systems, time_t
is actually smaller than "unsigned long" (e.g., because it
is signed), and we would overflow when using these
functions.  We don't know the actual size or signedness of
time_t, but we can easily check for truncation with a simple
assignment.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/date-c-double-semicolon'</title>
<updated>2013-10-30T19:11:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-10-30T19:11:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7522c589c94f00c0175a0e705b48a7218998fe89'/>
<id>urn:sha1:7522c589c94f00c0175a0e705b48a7218998fe89</id>
<content type='text'>
* jk/date-c-double-semicolon:
  drop redundant semicolon in empty while
</content>
</entry>
<entry>
<title>drop redundant semicolon in empty while</title>
<updated>2013-10-24T22:41:01Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-10-24T08:42:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=38db01b7fbbf5c043dc7d397789bd8cf102b76ae'/>
<id>urn:sha1:38db01b7fbbf5c043dc7d397789bd8cf102b76ae</id>
<content type='text'>
The extra semi-colon is harmless, since we really do want
the while loop to do nothing. But it does trigger a warning
from clang.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/prune-all'</title>
<updated>2013-05-29T21:23:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-05-29T21:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e1e7624aa2aa39890ca49d0f7bd3af397c22b03'/>
<id>urn:sha1:3e1e7624aa2aa39890ca49d0f7bd3af397c22b03</id>
<content type='text'>
We used the approxidate() parser for "--expire=&lt;timestamp&gt;" options
of various commands, but it is better to treat --expire=all and
--expire=now a bit more specially than using the current timestamp.
Update "git gc" and "git reflog" with a new parsing function for
expiry dates.

* jc/prune-all:
  prune: introduce OPT_EXPIRY_DATE() and use it
  api-parse-options.txt: document "no-" for non-boolean options
  git-gc.txt, git-reflog.txt: document new expiry options
  date.c: add parse_expiry_date()
</content>
</entry>
<entry>
<title>date.c: add parse_expiry_date()</title>
<updated>2013-04-17T23:03:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-17T22:38:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d27b9b005f26b107227fc18b6648df329daee97'/>
<id>urn:sha1:3d27b9b005f26b107227fc18b6648df329daee97</id>
<content type='text'>
"git reflog --expire=all" tries to expire reflog entries up to the
current second, because the approxidate() parser gives the current
timestamp for anything it does not understand (and it does not know
what time "all" means).  When the user tells us to expire "all" (or
set the expiration time to "now"), the user wants to remove all the
reflog entries (no reflog entry should record future time).

Just set it to ULONG_MAX and to let everything that is older that
timestamp expire.

While at it, allow "now" to be treated the same way for callers that
parse expiry date timestamp with this function.  Also use an error
reporting version of approxidate() to report misspelled date.  When
the user says e.g. "--expire=mnoday" to delete entries two days or
older on Wednesday, we wouldn't want the "unknown, default to now"
logic to kick in.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix time offset calculation in case of unsigned time_t</title>
<updated>2013-02-25T22:29:12Z</updated>
<author>
<name>Mike Gorchak</name>
<email>mike.gorchak.qnx@gmail.com</email>
</author>
<published>2013-02-25T21:53:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e1033da6af80b77d720ba7df9b8d3439666582e4'/>
<id>urn:sha1:e1033da6af80b77d720ba7df9b8d3439666582e4</id>
<content type='text'>
Fix time offset calculation expression in case if time_t
is unsigned. This code works fine for signed and
unsigned time_t.

Signed-off-by: Mike Gorchak &lt;mike.gorchak.qnx@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>date.c: fix unsigned time_t comparison</title>
<updated>2013-02-25T22:23:43Z</updated>
<author>
<name>Mike Gorchak</name>
<email>mike.gorchak.qnx@gmail.com</email>
</author>
<published>2013-02-25T21:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6e87516f569c2344f760287aec66f70da856c6d'/>
<id>urn:sha1:e6e87516f569c2344f760287aec66f70da856c6d</id>
<content type='text'>
tm_to_time_t() returns (time_t)-1 when it sees an error.  On
platforms with unsigned time_t, this value will be larger than any
valid timestamp and will break the "Is this older than 10 days in
the future?" check.

Signed-off-by: Mike Gorchak &lt;mike.gorchak.qnx@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
