git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Nicolas Pitre <nico@cam.org>, git@vger.kernel.org
Subject: Re: git-fast-import
Date: Tue, 6 Feb 2007 08:35:04 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702060829310.8424@woody.linux-foundation.org> (raw)
In-Reply-To: <20070206054808.GA10508@spearce.org>



On Tue, 6 Feb 2007, Shawn O. Pearce wrote:
> Nicolas Pitre <nico@cam.org> wrote:
> >
> > I think this is quite error prone, demonstrated by the fact that we 
> > screwed that up ourselves on a few occasions.  I think that the frontend 
> > should be relieved from this by letting it provide the time of change in 
> > a more natural format amongst all possible ones(like RFC2822 for 
> > example) and gfi should simply give it to parse_date().
> 
> This is a really good point.  Its a little bit of work to switch
> to parse_date(); I'll try to get it done tomorrow night.

Actually, I disagree. We've traditionally have had _less_ bugs with the 
pure integer format than we ever had with RFC2822 format.

The original (first seven days) date format inside git objects was 
rfc2822, and it was *horrible*. Not only does it take time to parse, 
people get it constantly wrong, and it's ambiguous what summer-time means 
etc. It's basically impossible to get anything that is totally repeatable 
from it, and you have to be so lax as to effectively accept even buggy 
input. And yes, buggy input exists.

So I would strongly suggest that gfi keeps to the standard git date format 
which is easy to parse, and totally unambiguous. Yes, you can get it 
wrong, but at least then it's very clear *who* gets it wrong: it's 
whatever feeds data to gfi. If gfi accepts a "soft" format, you get into 
all these gray areas of whether you want to be strictly rfc2822 only, or 
whether you actually want to accept stuff that everybody accepts 
(including the git date functions, that try very hard to turn anything 
sensible into a date). And DST. And odd timezone names, etc etc.

Having a hard format, set in stone, and totally unambiguous, is really a 
good thing. It actually ends up resulting in fewer bugs in the end, 
because it just makes sure that everybody is on the same page.

		Linus

  reply	other threads:[~2007-02-06 16:35 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06  2:31 git-fast-import Shawn O. Pearce
2007-02-06  3:18 ` git-fast-import Nicolas Pitre
2007-02-06  4:06 ` git-fast-import Nicolas Pitre
2007-02-06  5:48   ` git-fast-import Shawn O. Pearce
2007-02-06 16:35     ` Linus Torvalds [this message]
2007-02-06 16:56       ` git-fast-import Shawn O. Pearce
2007-02-06 17:20         ` git-fast-import Linus Torvalds
2007-02-06 18:53           ` git-fast-import Nicolas Pitre
2007-02-06 20:09             ` git-fast-import Shawn O. Pearce
2007-02-06 21:03               ` git-fast-import Nicolas Pitre
2007-02-06 21:15                 ` git-fast-import Shawn O. Pearce
2007-02-06 21:42                   ` git-fast-import Nicolas Pitre
2007-02-07 10:58             ` git-fast-import David Woodhouse
2007-02-06  6:12 ` git-fast-import Aneesh Kumar K.V
2007-02-06  6:18   ` git-fast-import Shawn O. Pearce
2007-02-07  4:55     ` git-fast-import Daniel Barkalow
2007-02-07  9:13       ` git-fast-import Karl Hasselström
2007-02-07 11:17         ` git-fast-import Johannes Schindelin
2007-02-07 22:55           ` git-fast-import Shawn O. Pearce
2007-02-07 23:55             ` git-fast-import Johannes Schindelin
2007-02-08  0:12               ` git-fast-import Shawn O. Pearce
2007-02-08 16:56               ` git-fast-import Linus Torvalds
2007-02-08 19:10                 ` git-fast-import Shawn O. Pearce
2007-02-09  8:49                   ` git-fast-import Karl Hasselström
2007-02-09 15:47                     ` git-fast-import Linus Torvalds
2007-02-07  9:29       ` git-fast-import Raimund Bauer
2007-02-07 13:38       ` git-fast-import David Woodhouse
2007-02-06  9:28 ` git-fast-import Andy Parkins
2007-02-06  9:40   ` git-fast-import Shawn O. Pearce
2007-02-06 16:37   ` git-fast-import Linus Torvalds
2007-02-06 16:44     ` git-fast-import Shawn O. Pearce
2007-02-06 17:24       ` git-fast-import Linus Torvalds
2007-02-07  1:17       ` git-fast-import Horst H. von Brand
2007-02-07  2:50         ` git-fast-import Linus Torvalds
2007-02-07  5:53           ` git-fast-import Shawn O. Pearce
2007-02-07  9:21             ` git-fast-import Karl Hasselström
2007-02-07 22:18             ` git-fast-import Horst H. von Brand
2007-02-07 22:31               ` git-fast-import Jakub Narebski
2007-02-07 22:39               ` git-fast-import Linus Torvalds
2007-02-08 21:34           ` git-fast-import Johannes Schindelin
2007-02-07  5:46         ` git-fast-import Shawn O. Pearce
2007-02-07  4:45       ` git-fast-import Daniel Barkalow
2007-02-06  9:34 ` git-fast-import Jakub Narebski
2007-02-06  9:39   ` git-fast-import Shawn O. Pearce
2007-02-06  9:53 ` git-fast-import Jakub Narebski
2007-02-06 17:20   ` git-fast-import Shawn O. Pearce
2007-02-06 13:50 ` git-fast-import Alex Riesen
2007-02-06 17:43   ` git-fast-import Shawn O. Pearce
2007-02-06 18:02     ` git-fast-import Alex Riesen
  -- strict thread matches above, loose matches on Subject: below --
2006-08-06  2:51 git-fast-import Jon Smirl
2006-08-06  3:40 ` git-fast-import Shawn Pearce
2006-08-06  4:09   ` git-fast-import Jon Smirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0702060829310.8424@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=nico@cam.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).