* How to set git commit timestamp
@ 2007-05-06 16:03 Guido Ostkamp
2007-05-06 16:41 ` Alex Riesen
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Guido Ostkamp @ 2007-05-06 16:03 UTC (permalink / raw)
To: git
Hello,
does somebody know a method to specify a timestamp for a 'git commit'?
I am writing a tool to convert from another SCM to git and need to replay
all checkins. I know how to set the log message and the author, but there
appears to be no command option for the timestamp (Mercurial for example,
has a 'hg commit -d date <file>' syntax for this).
Any help is appreciated.
Regards
Guido
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: How to set git commit timestamp
2007-05-06 16:03 How to set git commit timestamp Guido Ostkamp
@ 2007-05-06 16:41 ` Alex Riesen
2007-05-06 17:26 ` René Scharfe
2007-05-06 19:51 ` Robin Rosenberg
2 siblings, 0 replies; 9+ messages in thread
From: Alex Riesen @ 2007-05-06 16:41 UTC (permalink / raw)
To: Guido Ostkamp; +Cc: git
Guido Ostkamp, Sun, May 06, 2007 18:03:14 +0200:
>
> does somebody know a method to specify a timestamp for a 'git commit'?
>
Set GIT_AUTHOR_DATE (and maybe GIT_COMMITTER_DATE) in the environment.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to set git commit timestamp
2007-05-06 16:03 How to set git commit timestamp Guido Ostkamp
2007-05-06 16:41 ` Alex Riesen
@ 2007-05-06 17:26 ` René Scharfe
2007-05-06 19:51 ` Robin Rosenberg
2 siblings, 0 replies; 9+ messages in thread
From: René Scharfe @ 2007-05-06 17:26 UTC (permalink / raw)
To: Guido Ostkamp; +Cc: git
Guido Ostkamp schrieb:
> Hello,
>
> does somebody know a method to specify a timestamp for a 'git commit'?
>
> I am writing a tool to convert from another SCM to git and need to
> replay all checkins. I know how to set the log message and the author,
> but there appears to be no command option for the timestamp (Mercurial
> for example, has a 'hg commit -d date <file>' syntax for this).
You can use the environment variable GIT_COMMITTER_DATE to force a
specific commit date. Please see the man page of git-commit-tree for
(some) more info.
René
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to set git commit timestamp
2007-05-06 16:03 How to set git commit timestamp Guido Ostkamp
2007-05-06 16:41 ` Alex Riesen
2007-05-06 17:26 ` René Scharfe
@ 2007-05-06 19:51 ` Robin Rosenberg
2007-05-08 1:38 ` Shawn O. Pearce
2 siblings, 1 reply; 9+ messages in thread
From: Robin Rosenberg @ 2007-05-06 19:51 UTC (permalink / raw)
To: Guido Ostkamp; +Cc: git
söndag 06 maj 2007 skrev Guido Ostkamp:
> Hello,
>
> does somebody know a method to specify a timestamp for a 'git commit'?
>
> I am writing a tool to convert from another SCM to git and need to replay
> all checkins. I know how to set the log message and the author, but there
> appears to be no command option for the timestamp (Mercurial for example,
> has a 'hg commit -d date <file>' syntax for this).
If you are writing a converter then you should really use the plumbing
commands rather than porcelains like git-commit and in particular you should
look at git-fast-import for a really fast methord of importing (and packing)
objects.
-- robin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to set git commit timestamp
2007-05-06 19:51 ` Robin Rosenberg
@ 2007-05-08 1:38 ` Shawn O. Pearce
2007-05-08 1:54 ` Jakub Narebski
0 siblings, 1 reply; 9+ messages in thread
From: Shawn O. Pearce @ 2007-05-08 1:38 UTC (permalink / raw)
To: Guido Ostkamp; +Cc: Robin Rosenberg, git
Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> söndag 06 maj 2007 skrev Guido Ostkamp:
> > I am writing a tool to convert from another SCM to git and need to replay
> > all checkins. I know how to set the log message and the author, but there
> > appears to be no command option for the timestamp (Mercurial for example,
> > has a 'hg commit -d date <file>' syntax for this).
>
> If you are writing a converter then you should really use the plumbing
> commands rather than porcelains like git-commit and in particular you should
> look at git-fast-import for a really fast methord of importing (and packing)
> objects.
As the author of a few convert-to-git things, fast-import really
is the easiest way to import stuff into git, even if it doesn't
need to be "fast". The input format is quite simple to create,
and is documented pretty heavily in the git-fast-import manual page.
There's also contrib/fast-import/import-tars.pl which handles
decompressing and importing one or more tar files into a Git
repository. Works pretty well...
So I agree with Robin, give fast-import a try.
--
Shawn.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to set git commit timestamp
2007-05-08 1:38 ` Shawn O. Pearce
@ 2007-05-08 1:54 ` Jakub Narebski
2007-05-08 1:57 ` Shawn O. Pearce
0 siblings, 1 reply; 9+ messages in thread
From: Jakub Narebski @ 2007-05-08 1:54 UTC (permalink / raw)
To: git
Shawn O. Pearce wrote:
> Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
>> söndag 06 maj 2007 skrev Guido Ostkamp:
>>> I am writing a tool to convert from another SCM to git and need to replay
>>> all checkins. I know how to set the log message and the author, but there
>>> appears to be no command option for the timestamp (Mercurial for example,
>>> has a 'hg commit -d date <file>' syntax for this).
>>
>> If you are writing a converter then you should really use the plumbing
>> commands rather than porcelains like git-commit and in particular you should
>> look at git-fast-import for a really fast methord of importing (and packing)
>> objects.
>
> As the author of a few convert-to-git things, fast-import really
> is the easiest way to import stuff into git, even if it doesn't
> need to be "fast". The input format is quite simple to create,
> and is documented pretty heavily in the git-fast-import manual page.
>
> There's also contrib/fast-import/import-tars.pl which handles
> decompressing and importing one or more tar files into a Git
> repository. Works pretty well...
By the way, is there fast-import version of git-quiltimport?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to set git commit timestamp
2007-05-08 1:54 ` Jakub Narebski
@ 2007-05-08 1:57 ` Shawn O. Pearce
2007-05-08 11:29 ` Johannes Schindelin
0 siblings, 1 reply; 9+ messages in thread
From: Shawn O. Pearce @ 2007-05-08 1:57 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski <jnareb@gmail.com> wrote:
> By the way, is there fast-import version of git-quiltimport?
No, and I don't think its easy. Isn't a quilt patchstack stored
as a series of patch files? So "importing" it into Git requires
applying the patch to the base tree, then writing that base tree
to the ODB. fast-import doesn't know how to run git-apply, though
Junio and I did kick it around (generally) a few months ago on #git.
--
Shawn.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to set git commit timestamp
2007-05-08 1:57 ` Shawn O. Pearce
@ 2007-05-08 11:29 ` Johannes Schindelin
2007-05-11 10:58 ` Jakub Narebski
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2007-05-08 11:29 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Jakub Narebski, git
Hi,
On Mon, 7 May 2007, Shawn O. Pearce wrote:
> Jakub Narebski <jnareb@gmail.com> wrote:
> > By the way, is there fast-import version of git-quiltimport?
>
> No, and I don't think its easy. Isn't a quilt patchstack stored as a
> series of patch files? So "importing" it into Git requires applying the
> patch to the base tree, then writing that base tree to the ODB.
> fast-import doesn't know how to run git-apply, though Junio and I did
> kick it around (generally) a few months ago on #git.
You'd have to pretend that all of these patches are branches. Well, in the
end they are...
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to set git commit timestamp
2007-05-08 11:29 ` Johannes Schindelin
@ 2007-05-11 10:58 ` Jakub Narebski
0 siblings, 0 replies; 9+ messages in thread
From: Jakub Narebski @ 2007-05-11 10:58 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Shawn O. Pearce, git
On Tue, 8 May 2007, Johannes Schindelin wrote:
> On Mon, 7 May 2007, Shawn O. Pearce wrote:
>> Jakub Narebski <jnareb@gmail.com> wrote:
>>> By the way, is there fast-import version of git-quiltimport?
>>
>> No, and I don't think its easy. Isn't a quilt patchstack stored as a
>> series of patch files? So "importing" it into Git requires applying the
>> patch to the base tree, then writing that base tree to the ODB.
>> fast-import doesn't know how to run git-apply, though Junio and I did
>> kick it around (generally) a few months ago on #git.
>
> You'd have to pretend that all of these patches are branches. Well, in the
> end they are...
Or rather that patch _series_ are branches.
It would be also nice to have one of the patch management UI on top of git
like StGIT or Guilt (IIRC pg is no longer maintained) to import series
of patches as unapplied from Quilt (or from mbox/file).
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-11 11:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-06 16:03 How to set git commit timestamp Guido Ostkamp
2007-05-06 16:41 ` Alex Riesen
2007-05-06 17:26 ` René Scharfe
2007-05-06 19:51 ` Robin Rosenberg
2007-05-08 1:38 ` Shawn O. Pearce
2007-05-08 1:54 ` Jakub Narebski
2007-05-08 1:57 ` Shawn O. Pearce
2007-05-08 11:29 ` Johannes Schindelin
2007-05-11 10:58 ` Jakub Narebski
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).