Re: [PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset
Ben Walton writes: > On Wed, Jan 16, 2013 at 3:37 PM, Junio C Hamano wrote: >> Ben Walton 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. -- 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
Re: [PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset
On Wed, Jan 16, 2013 at 3:37 PM, Junio C Hamano wrote: > Ben Walton 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. Thanks -Ben [1] http://lists-archives.com/git/683572-git-svn-fix-for-systems-without-strftime-z.html -- --- Take the risk of thinking for yourself. Much more happiness, truth, beauty and wisdom will come to you that way. -Christopher Hitchens --- -- 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
Re: [PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset
Ben Walton 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? -- 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