git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 16, 2013, 20:36 UTC
Message-ID
<7vehhkx3ul.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAP30j164UD9gNRbZ=uCQjgpDODWnGtYmHcWES2P=YPryL=FbZA@mail.gmail.com>
Ben Walton <bdwalton@gmail.com> writes:
Show 18 quoted lines
> On Wed, Jan 16, 2013 at 3:37 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Ben Walton <bdwalton@gmail.com> writes:
>>
>>> +sub get_tz_offset {
>>> +     # some systmes don't handle or mishandle %z, so be creative.
>>
>> Hmph.  I wonder if we can use %z if it is handled correctly and fall
>> back to this code only on platforms that are broken?
>
> That would be perfectly acceptable to me.  The reason I set it up to
> always run through this function here is that when I originally added
> this function for git-svn, I'd made it conditional and Eric Wong
> preferred that the function be used exclusively[1].  I opted to take
> the same approach here to keep things congrous.
>
> If it were to be conditional, I think I'd add a variable to the build
> system and have the code leverage that at runtime instead of the
> try/except approach I attempted in 2009.

If the code was originally unconditional for a reason (and I think being bug-to-bug compatible across platforms is actually a good thing in a tool like importers), I would not object to it. Thanks for the back-story.

Previous: Ben WaltonNext: Ben Walton
Message 5 of 13 in “Fix a portability issue with git-cvsimport”
  1. 0/3 Fix a portability issue with git-cvsimportBen Walton, Jan 15, 2013
  2. 1/3 Move Git::SVN::get_tz to Git::get_tz_offsetBen Walton, Jan 15, 2013
  3. Junio C HamanoJan 16, 2013
  4. Ben WaltonJan 16, 2013
  5. Junio C HamanoJan 16, 2013
  6. 2/3 Allow Git::get_tz_offset to properly handle DST boundary timesBen Walton, Jan 15, 2013
  7. Junio C HamanoJan 17, 2013
  8. Ben WaltonJan 20, 2013
  9. Junio C HamanoJan 20, 2013
  10. 3/3 Avoid non-portable strftime format specifiers in git-cvsimportBen Walton, Jan 15, 2013
  11. Chris RorvickJan 16, 2013
  12. Ben WaltonJan 16, 2013
  13. Junio C HamanoJan 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.