tags:

views:

128

answers:

2

I've been using Git & Git-Svn for a year or so now and somehow just noticed that, after a dcommit, my commit history is preserved, but the timestamps aren't. In other words, each git commit entry is retained, but in Svn each commit has the same timestamp (more or less).

It's not unusual for me to work remotely for a day or so at a time, making any number of commits throughout that time. Ideally, I'd like for my svn log to reflect the times I made those commits to git rather than the time that the commit (along with any other commits) was dcommitted to svn. Is that possible?

Thanks.

+1  A: 

When git-svn creates a Subversion commit, it does roughly the same thing that you would normally do with Subversion to create a commit. This means that the Subversion timestamp will be the time that the git svn dcommit operation is run.

Even if you could change the commit timestamp, this may not be what you want to do. Normally people will expect that commit timestamps in Subversion follow a chronologically increasing sequence, and it might be confusing to see "backdated" timestamps in the repository.

Greg Hewgill
Fair enough. In this case, I happen to be working alone on a project, but you're right that it would be incredibly confusing in a team situation. Especially since each git commit is applied atop any earlier changes via rebase.
Rob Wilkerson
A: 

It should be definitely possible by changing the svn:date property but I don't think git-svn implements this.

git-svn-replay does implement this though, but it has a very different purpose than git-svn.

Mauricio Scheffer