threads / discuss / 9344

Why does git-svn dcommit rewrite the log messages?

Subject: Why does git-svn dcommit rewrite the log messages?

## tl;dr

3 messages between Aug 1, 2007 and Aug 3, 2007.

replies: 2people: 2as markdown or json

Patrick Doyle· Aug 1, 2007, 21:19 UTC · lore

I see that it appends text to the log messages with the SVN repository revision and ID. Does it do that because:

1) That's the _only_ way to keep git & svn in sync
If so, then I guess I'm out of luck.  But it seems (to my
inexperienced eye) to make branching impossible in git -- as soon as I
do a "git-svn dcommit", I lose the commit on which my branch was
originally based.  Or, am I missing something?
2) That was the simplest way to keep them in sync at the time git-svn
was written and it hasn't bothered anybody enough to go back and fix
it.
If so, I'd be glad to see what I could do to fix it.  I would also
appreciate any pointers folks might care to give to get me started.
--wpd
Sam Vilain· Aug 2, 2007, 19:44 UTC · re: Patrick Doyle · lore

Re: Why does git-svn dcommit rewrite the log messages?

Patrick Doyle wrote:
Show 15 quoted lines
> I see that it appends text to the log messages with the SVN repository
> revision and ID.  Does it do that because:
>
> 1) That's the _only_ way to keep git & svn in sync
> If so, then I guess I'm out of luck.  But it seems (to my
> inexperienced eye) to make branching impossible in git -- as soon as I
> do a "git-svn dcommit", I lose the commit on which my branch was
> originally based.  Or, am I missing something?
>
> 2) That was the simplest way to keep them in sync at the time git-svn
> was written and it hasn't bothered anybody enough to go back and fix
> it.
> If so, I'd be glad to see what I could do to fix it.  I would also
> appreciate any pointers folks might care to give to get me started.
>   

Primarily it's so that the person who pushed via dcommit and people who sync via git-svn fetch get the same commit ID (assuming they are both using the same authors map).

It might be possible to store the extra information needed to recreate exactly the original git commit in SVN revision properties, but this would need to be implemented once and basically not changed after that.

You can disable this behaviour, but you'll end up with duplicate commits.
Sam.
Patrick Doyle· Aug 3, 2007, 01:44 UTC · re: Sam Vilain · lore

Re: Why does git-svn dcommit rewrite the log messages?

Show 11 quoted lines
> Primarily it's so that the person who pushed via dcommit and people who
> sync via git-svn fetch get the same commit ID (assuming they are both
> using the same authors map).
>
> It might be possible to store the extra information needed to recreate
> exactly the original git commit in SVN revision properties, but this
> would need to be implemented once and basically not changed after that.
>
> You can disable this behaviour, but you'll end up with duplicate commits.
>
> Sam.

Thanks Sam, Now I see the noMetadata option. I'll give that try and see how much trouble I get myself in.

As I was thinking about this some more, I started wondering if perhaps the information could be stored in a .git-svnid file, that was versioned on the subversion server as well as in the local git repository.

I'll have to think through the implications of your explanation in the mean time.

--wpd

← back to recent threads