<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/date.c, branch v2.2.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-09-19T18:38:33Z</updated>
<entry>
<title>Merge branch 'jk/commit-author-parsing'</title>
<updated>2014-09-19T18:38:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-19T18:38:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ff700ebacffc8fb8cf80daabfb6503cb24dca0b'/>
<id>urn:sha1:9ff700ebacffc8fb8cf80daabfb6503cb24dca0b</id>
<content type='text'>
Code clean-up.

* jk/commit-author-parsing:
  determine_author_info(): copy getenv output
  determine_author_info(): reuse parsing functions
  date: use strbufs in date-formatting functions
  record_author_date(): use find_commit_header()
  record_author_date(): fix memory leak on malformed commit
  commit: provide a function to find a header in a buffer
</content>
</entry>
<entry>
<title>pretty: provide a strict ISO 8601 date format</title>
<updated>2014-08-29T19:37:02Z</updated>
<author>
<name>Beat Bolli</name>
<email>bbolli@ewanet.ch</email>
</author>
<published>2014-08-29T16:58:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=466fb6742d7fb7d3e6994b2d0d8db83a8786ebcf'/>
<id>urn:sha1:466fb6742d7fb7d3e6994b2d0d8db83a8786ebcf</id>
<content type='text'>
Git's "ISO" date format does not really conform to the ISO 8601
standard due to small differences, and it cannot be parsed by ISO
8601-only parsers, e.g. those of XML toolchains.

The output from "--date=iso" deviates from ISO 8601 in these ways:

  - a space instead of the `T` date/time delimiter
  - a space between time and time zone
  - no colon between hours and minutes of the time zone

Add a strict ISO 8601 date format for displaying committer and
author dates.  Use the '%aI' and '%cI' format specifiers and add
'--date=iso-strict' or '--date=iso8601-strict' date format names.

See http://thread.gmane.org/gmane.comp.version-control.git/255879 and
http://thread.gmane.org/gmane.comp.version-control.git/52414/focus=52585
for discussion.

Signed-off-by: Beat Bolli &lt;bbolli@ewanet.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>date: use strbufs in date-formatting functions</title>
<updated>2014-08-27T17:32:56Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-08-27T07:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c33ddc2e33d51da9391a81206a1d9e4a92d97d10'/>
<id>urn:sha1:c33ddc2e33d51da9391a81206a1d9e4a92d97d10</id>
<content type='text'>
Many of the date functions write into fixed-size buffers.
This is a minor pain, as we have to take special
precautions, and frequently end up copying the result into a
strbuf or heap-allocated buffer anyway (for which we
sometimes use strcpy!).

Let's instead teach parse_date, datestamp, etc to write to a
strbuf. The obvious downside is that we might need to
perform a heap allocation where we otherwise would not need
to. However, it turns out that the only two new allocations
required are:

  1. In test-date.c, where we don't care about efficiency.

  2. In determine_author_info, which is not performance
     critical (and where the use of a strbuf will help later
     refactoring).

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>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>
</feed>
