Re: git-fast-import
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Feb 6, 2007, 20:09 UTC
- Message-ID
- <20070206200924.GA5352@spearce.org>
- In-Reply-To
- <Pine.LNX.4.64.0702061329090.19212@xanadu.home>
Nicolas Pitre <nico@cam.org> wrote:
> This is therefore a damn good idea if gfi can make things right out of > crap because frontends will not get much attention after the first "hey > it works" level. And the GIT date format, albeit being perfectly > unambigous, is not inline with the statement above.
Done. I just pushed a change to gfi which adds `--date-format=<fmt>`. For <fmt> you have the choice of:
raw: Standard Git format. This is the default, as its what the existing frontends by Chris Lee, Simon Hausmann, Jon Smirl, and Simon 'corecode' Schubert expect.
rfc2822: Run whatever crap you give us through parse_date(), and cross your fingers. If parse_date() returns < 0 we bomb out, but otherwise take it at its word.
now: This is a toy, but useful if you really want now, dammit. We just call datestamp() and tack that in. Note that the frontend must also supply the literal string `now` in the committer line (e.g. "committer A U Thor <at@example.com> now") to prevent us from bombing out.
The last one will probably get more useful when I fix gfi so it can safely commit against active refs without losing commits (make it do a strict fast-forward check before updating). In this case it may be useful for something like git-cvsserver, as it avoids the need for a temporary directory, index, etc.
-- Shawn.