<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/date.c, branch v1.0rc1</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.0rc1</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.0rc1'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2005-10-15T00:17:27Z</updated>
<entry>
<title>Unlocalized isspace and friends</title>
<updated>2005-10-15T00:17:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2005-10-13T18:03:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4546738b58a0134eef154231b07d60fc174d56e3'/>
<id>urn:sha1:4546738b58a0134eef154231b07d60fc174d56e3</id>
<content type='text'>
Do our own ctype.h, just to get the sane semantics: we want
locale-independence, _and_ we want the right signed behaviour. Plus we
only use a very small subset of ctype.h anyway (isspace, isalpha,
isdigit and isalnum).

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix strange timezone handling</title>
<updated>2005-09-22T08:53:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2005-09-21T22:50:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=01c6ad29bd1b647d4fd1acea54e374c740ec3c10'/>
<id>urn:sha1:01c6ad29bd1b647d4fd1acea54e374c740ec3c10</id>
<content type='text'>
We generate the ASCII representation of our internal date representation
("seconds since 1970, UTC + timezone information") in two different
places.

One of them uses the stupid and obvious way to make sure that it gets the
sexagecimal representation right for negative timezones even if they might
not be exact hours, and the other one depends on the modulus operator
always matching the sign of argument.

Hey, the clever one works. And C90 even specifies that behaviour. But I
had to think about it for a while when I was re-visiting this area, and
even if I didn't have to, it's kind of strange to have two different ways
to print out the same data format.

So use a common helper for this. And select the stupid and straighforward
way.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>[PATCH] Return proper error valud from "parse_date()"</title>
<updated>2005-09-20T22:07:54Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2005-09-19T22:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2a39064c65e70a3e763c4dff5553cd2af3d10211'/>
<id>urn:sha1:2a39064c65e70a3e763c4dff5553cd2af3d10211</id>
<content type='text'>
Right now we don't return any error value at all from parse_date(), and if
we can't parse it, we just silently leave the result buffer unchanged.

That's fine for the current user, which will always default to the current
date, but it's a crappy interface, and we might well be better off with an
error message rather than just the default date.

So let's change the thing to return a negative value if an error occurs,
and the length of the result otherwise (snprintf behaviour: if the buffer
is too small, it returns how big it _would_ have been).

[ I started looking at this in case we could support date-based revision
  names. Looks ugly. Would have to parse relative dates.. ]

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>parse_date(): allow const date string</title>
<updated>2005-07-12T17:33:06Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@g5.osdl.org</email>
</author>
<published>2005-07-12T17:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=26a2d8ae898f5442904dd2fbf89c5fe34480ea85'/>
<id>urn:sha1:26a2d8ae898f5442904dd2fbf89c5fe34480ea85</id>
<content type='text'>
This is part of breaking up the tag ID patch by Eric Biederman.
</content>
</entry>
<entry>
<title>[PATCH] fix date parsing for GIT raw commit timestamp format.</title>
<updated>2005-06-25T23:52:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-25T09:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9cb480f2ad653d834fe5e4ba7a8a25f74ad1d89b'/>
<id>urn:sha1:9cb480f2ad653d834fe5e4ba7a8a25f74ad1d89b</id>
<content type='text'>
Usually all of the match_xxx routines in date.c fill tm
structure assuming that the parsed string talks about local
time, and parse_date routine compensates for it by adjusting the
value with tz offset parsed out separately.  However, this logic
does not work well when we feed GIT raw commit timestamp to it,
because what match_digits gets is already in GMT.

A good testcase is:

    $ make test-date
    $ ./test-date 'Fri Jun 24 16:55:27 2005 -0700' '1119657327 -0700'

These two timestamps represent the same time, but the second one
without the fix this commit introduces gives you 7 hours off.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Include file cleanups..</title>
<updated>2005-05-22T18:54:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-05-22T18:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6b0c3121061df6b323f430700e8077b324b5e9dd'/>
<id>urn:sha1:6b0c3121061df6b323f430700e8077b324b5e9dd</id>
<content type='text'>
Add &lt;limits.h&gt; to the include files handled by "cache.h", and remove
extraneous #include directives from various .c files. The rule is that
"cache.h" gets all the basic stuff, so that we'll have as few system
dependencies as possible.
</content>
</entry>
<entry>
<title>sparse cleanup</title>
<updated>2005-05-20T18:46:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-05-20T18:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e99d59ff0bff349ef205cef1076e0354c8130680'/>
<id>urn:sha1:e99d59ff0bff349ef205cef1076e0354c8130680</id>
<content type='text'>
Fix various things that sparse complains about:
 - use NULL instead of 0
 - make sure we declare everything properly, or mark it static
 - use proper function declarations ("fn(void)" instead of "fn()")

Sparse is always right.
</content>
</entry>
<entry>
<title>[PATCH] fix show_date() for positive timezones</title>
<updated>2005-05-18T21:23:04Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2005-05-18T21:11:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=fbab835c03f1c73e4de920d00cd26519506d33fe'/>
<id>urn:sha1:fbab835c03f1c73e4de920d00cd26519506d33fe</id>
<content type='text'>
Signed-off-by: Nicolas Pitre &lt;nico@cam.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>date.c: add "show_date()" function.</title>
<updated>2005-05-06T22:28:59Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-05-06T22:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f80cd783c6f346388bbb0a6a15672be99a71f7ed'/>
<id>urn:sha1:f80cd783c6f346388bbb0a6a15672be99a71f7ed</id>
<content type='text'>
Kind of like ctime(), but not as broken.
</content>
</entry>
<entry>
<title>date handling: handle "AM"/"PM" on time</title>
<updated>2005-05-01T19:34:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-05-01T19:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=68849b544258cafdf42f3ebe9772ee7a346f7147'/>
<id>urn:sha1:68849b544258cafdf42f3ebe9772ee7a346f7147</id>
<content type='text'>
And be a bitmore careful about matching: if we don't recognize a word
or a number, we skip the whole thing, rather than trying the next character
in that word/number.

Finally: since ctime() adds the final '\n', don't add another one in test-date.
</content>
</entry>
</feed>
