# git-svn: commit author x commit committer issue

12 messages from 2007-08-08 to 2007-08-23. Participants: Richard MUSIL, Peter Baumann, Quy Tonthat, Eric Wong, Guilhem Bonnefille, Junio C Hamano.
Thread: https://gitlist.dev/t/9433

## Richard MUSIL, 2007-08-08 13:46

Subject: git-svn: commit author x commit committer issue
Message-ID: <46B9C92B.3000000@st.com>
URL: https://gitlist.dev/e/46B9C92B.3000000%40st.com

```
Normally, when patch is applied, git distinguishes commit author and
commit committer (relying on info from patch).
However, after the patches are committed to svn repository using:
git-svn dcommit
author and committer data are set to same values (or at least time and
date, I cannot verify it for names).
I wonder if there is any reason for this behavior, because I would
definitely like to keep original commit info (which came from patch) in
my git repository.

Richard Musil
(please cc: me)

```

## Quy Tonthat, 2007-08-08 15:42

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <46B9E460.5080708@gmail.com>
URL: https://gitlist.dev/e/46B9E460.5080708%40gmail.com
In-Reply-To: <46B9C92B.3000000@st.com>

```
Richard MUSIL wrote:
> Normally, when patch is applied, git distinguishes commit author and
> commit committer (relying on info from patch).
> However, after the patches are committed to svn repository using:
> git-svn dcommit
> author and committer data are set to same values (or at least time and
> date, I cannot verify it for names).
> I wonder if there is any reason for this behavior, because I would
> definitely like to keep original commit info (which came from patch) in
> my git repository.

I'm sure this worked before (author and committee are different, that is).
Something went wrong recently but I haven't got time to look into the problem.
I hope someone would.

Quy

```

## Peter Baumann, 2007-08-08 17:13

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <20070808171323.GD27703@xp.machine.xx>
URL: https://gitlist.dev/e/20070808171323.GD27703%40xp.machine.xx
In-Reply-To: <46B9C92B.3000000@st.com>

```
On Wed, Aug 08, 2007 at 03:46:19PM +0200, Richard MUSIL wrote:
> Normally, when patch is applied, git distinguishes commit author and
> commit committer (relying on info from patch).
> However, after the patches are committed to svn repository using:
> git-svn dcommit
> author and committer data are set to same values (or at least time and
> date, I cannot verify it for names).
> I wonder if there is any reason for this behavior, because I would
> definitely like to keep original commit info (which came from patch) in
> my git repository.

I think it is because in SVN, you can't differentiate between author and
committer. And git-svn just commits every local commit to svn, and after
that, it throws away your local commits and uses the info from the
reimported svn commits to recreate those thrown away commits. Thats why
you loose your author name and also your commit date.

Ok, this was a little too simplified, but describes roughly what happens
if you dcommit your changes.

-Peter

```

## Richard MUSIL, 2007-08-09 09:45

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <46BAE248.6070404@st.com>
URL: https://gitlist.dev/e/46BAE248.6070404%40st.com
In-Reply-To: <20070808171323.GD27703@xp.machine.xx>

```
Peter Baumann wrote:
> On Wed, Aug 08, 2007 at 03:46:19PM +0200, Richard MUSIL wrote:
>> Normally, when patch is applied, git distinguishes commit author and
>> commit committer (relying on info from patch).
>> However, after the patches are committed to svn repository using:
>> git-svn dcommit
>> author and committer data are set to same values (or at least time and
>> date, I cannot verify it for names).
>> I wonder if there is any reason for this behavior, because I would
>> definitely like to keep original commit info (which came from patch) in
>> my git repository.
> 
> I think it is because in SVN, you can't differentiate between author and
> committer. And git-svn just commits every local commit to svn, and after
> that, it throws away your local commits and uses the info from the
> reimported svn commits to recreate those thrown away commits. Thats why
> you loose your author name and also your commit date.

I guess you are right. I have been thinking about the possibility to
store the original author and patch date into svn unversioned property.
Something like git:author and git:date. There is however one catch.
Modifying unversioned properties must be explicitly allowed on svn
repository, so this will have to be optional in git (svn.userevprops ?).

I do not know what others think about this. For me it seems quite
attractive, to be able to store development history of original actions
inside svn, especially when the case might be that commits into git
happen at different time on different machines and by different people
than the final commit to svn.

I have been trying to find out how this works in git-svn, but since Perl
is worse than Greek to me, I found out only that I am not able to do
anything here. Would anyone be interested to work on it?

Richard

```

## Eric Wong, 2007-08-16 09:20

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <20070816092002.GD16849@muzzle>
URL: https://gitlist.dev/e/20070816092002.GD16849%40muzzle
In-Reply-To: <46B9C92B.3000000@st.com>

```
Richard MUSIL <richard.musil@st.com> wrote:
> Normally, when patch is applied, git distinguishes commit author and
> commit committer (relying on info from patch).
> However, after the patches are committed to svn repository using:
> git-svn dcommit
> author and committer data are set to same values (or at least time and
> date, I cannot verify it for names).
> I wonder if there is any reason for this behavior, because I would
> definitely like to keep original commit info (which came from patch) in
> my git repository.

I try to keep commits made to SVN using git-svn as much like commits
made using other SVN clients as much as possible.

Two people using git-svn (in its recommended fashion and maintaining
linear history) can have identical SHA1s in their repository even if
those two repositories had never seen each other before.  Consistency
is good.

I also want to avoid creating extra junk on the SVN repository which I
don't personally consider very important.  SVK does stuff like that with
merges, and only SVK understands the metadata it uses.  I prefer
transparency.

-- 
Eric Wong

```

## Richard MUSIL, 2007-08-16 12:13

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <46C43F5F.3040508@st.com>
URL: https://gitlist.dev/e/46C43F5F.3040508%40st.com
In-Reply-To: <20070816092002.GD16849@muzzle>

```
Eric Wong wrote:
> Richard MUSIL <richard.musil@st.com> wrote:
>> Normally, when patch is applied, git distinguishes commit author and
>> commit committer (relying on info from patch).
>> However, after the patches are committed to svn repository using:
>> git-svn dcommit
>> author and committer data are set to same values (or at least time and
>> date, I cannot verify it for names).
>> I wonder if there is any reason for this behavior, because I would
>> definitely like to keep original commit info (which came from patch) in
>> my git repository.
> 
> I try to keep commits made to SVN using git-svn as much like commits
> made using other SVN clients as much as possible.
> 
> Two people using git-svn (in its recommended fashion and maintaining
> linear history) can have identical SHA1s in their repository even if
> those two repositories had never seen each other before.  Consistency
> is good.

Ok, if I understand well, you are saying, that if someone commits with
distinguished author/committer and someone does not, they end up with
different SHA1s because those parts affect the calculation. I agree this
could be a breaking point.

> I also want to avoid creating extra junk on the SVN repository which I
> don't personally consider very important.  SVK does stuff like that with
> merges, and only SVK understands the metadata it uses.  I prefer
> transparency.

I made some suggestions in this thread about using revision
(unversioned) property of SVN fot git "metadata". AFAIK using rev. props
is completely transparent to other SVN clients (in this case those not
being git-svn), so they could easily ignore them.

It could be optional on git config property for commit and autodetected
for clone/pull.

The scenario I could easily imagine (though it is not something I am
currently using) is having dev teams using git internally (because its
much easier for tracking local development) and having SVN repo as a
"central hub". In such environment, there will be probably one person in
each team (dev. lead) collecting commits from others and once things are
set, he will commit all changes to svn. In that particular case, he does
not have to worry about different sha1s, because they use only one SVN
(as it was meant to be used). But he could be sad about losing all
authors info about the people commits. And my personal believe is, this
is how git-svn may enter svn world on big projects.

But you are right, it is up to you to decide. It was just an idea ;-).

Richard

```

## Eric Wong, 2007-08-17 07:58

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <20070817075840.GA9504@soma>
URL: https://gitlist.dev/e/20070817075840.GA9504%40soma
In-Reply-To: <46C43F5F.3040508@st.com>

```
Richard MUSIL <richard.musil@st.com> wrote:
> Eric Wong wrote:
> > Richard MUSIL <richard.musil@st.com> wrote:
> > I also want to avoid creating extra junk on the SVN repository which I
> > don't personally consider very important.  SVK does stuff like that with
> > merges, and only SVK understands the metadata it uses.  I prefer
> > transparency.
> 
> I made some suggestions in this thread about using revision
> (unversioned) property of SVN fot git "metadata". AFAIK using rev. props
> is completely transparent to other SVN clients (in this case those not
> being git-svn), so they could easily ignore them.
> 
> It could be optional on git config property for commit and autodetected
> for clone/pull.
> 
> The scenario I could easily imagine (though it is not something I am
> currently using) is having dev teams using git internally (because its
> much easier for tracking local development) and having SVN repo as a
> "central hub". In such environment, there will be probably one person in
> each team (dev. lead) collecting commits from others and once things are
> set, he will commit all changes to svn. In that particular case, he does
> not have to worry about different sha1s, because they use only one SVN
> (as it was meant to be used). But he could be sad about losing all
> authors info about the people commits. And my personal believe is, this
> is how git-svn may enter svn world on big projects.
> 
> But you are right, it is up to you to decide. It was just an idea ;-).

It'd be easy for git-svn to write metadata to rev-props.  Whether or not
it reads and does anything with them is another issue...  I think Sam
was working on something that allowed it to track merges on the
git-side, but we'd be introducing a third or fourth method of
non-standard merge-tracking into SVN :)

In any case, this behavior should always be optional and off by default.

-- 
Eric Wong

```

## Guilhem Bonnefille, 2007-08-22 10:07

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <8b65902a0708220307g2cb4b290s9bbf4603af7489fa@mail.gmail.com>
URL: https://gitlist.dev/e/8b65902a0708220307g2cb4b290s9bbf4603af7489fa%40mail.gmail.com
In-Reply-To: <20070816092002.GD16849@muzzle>

```
On 8/16/07, Eric Wong <normalperson@yhbt.net> wrote:
> Richard MUSIL <richard.musil@st.com> wrote:
> > Normally, when patch is applied, git distinguishes commit author and
> > commit committer (relying on info from patch).
> > However, after the patches are committed to svn repository using:
> > git-svn dcommit
> > author and committer data are set to same values (or at least time and
> > date, I cannot verify it for names).
> > I wonder if there is any reason for this behavior, because I would
> > definitely like to keep original commit info (which came from patch) in
> > my git repository.
>
> I try to keep commits made to SVN using git-svn as much like commits
> made using other SVN clients as much as possible.
>
> Two people using git-svn (in its recommended fashion and maintaining
> linear history) can have identical SHA1s in their repository even if
> those two repositories had never seen each other before.  Consistency
> is good.
>
> I also want to avoid creating extra junk on the SVN repository which I
> don't personally consider very important.  SVK does stuff like that with
> merges, and only SVK understands the metadata it uses.  I prefer
> transparency.

Instead of using SVN metadata, why not store the missing information
like git-svn store the SVN rev id. (in the commit log as I know).

-- 
Guilhem BONNEFILLE
-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/

```

## Guilhem Bonnefille, 2007-08-22 10:17

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <8b65902a0708220317t2b3dd01csef460a943ed2ef37@mail.gmail.com>
URL: https://gitlist.dev/e/8b65902a0708220317t2b3dd01csef460a943ed2ef37%40mail.gmail.com
In-Reply-To: <8b65902a0708220307g2cb4b290s9bbf4603af7489fa@mail.gmail.com>

```
Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
log in the Git repo, not on the SVN repo.
Please, ignore me.

On 8/22/07, Guilhem Bonnefille <guilhem.bonnefille@gmail.com> wrote:
> On 8/16/07, Eric Wong <normalperson@yhbt.net> wrote:
> > Richard MUSIL <richard.musil@st.com> wrote:
> > > Normally, when patch is applied, git distinguishes commit author and
> > > commit committer (relying on info from patch).
> > > However, after the patches are committed to svn repository using:
> > > git-svn dcommit
> > > author and committer data are set to same values (or at least time and
> > > date, I cannot verify it for names).
> > > I wonder if there is any reason for this behavior, because I would
> > > definitely like to keep original commit info (which came from patch) in
> > > my git repository.
> >
> > I try to keep commits made to SVN using git-svn as much like commits
> > made using other SVN clients as much as possible.
> >
> > Two people using git-svn (in its recommended fashion and maintaining
> > linear history) can have identical SHA1s in their repository even if
> > those two repositories had never seen each other before.  Consistency
> > is good.
> >
> > I also want to avoid creating extra junk on the SVN repository which I
> > don't personally consider very important.  SVK does stuff like that with
> > merges, and only SVK understands the metadata it uses.  I prefer
> > transparency.
>
> Instead of using SVN metadata, why not store the missing information
> like git-svn store the SVN rev id. (in the commit log as I know).
>
> --
> Guilhem BONNEFILLE
> -=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
> -=- mailto:guilhem.bonnefille@gmail.com
> -=- http://nathguil.free.fr/
>


-- 
Guilhem BONNEFILLE
-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/

```

## Junio C Hamano, 2007-08-22 21:34

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <7vir77i77o.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vir77i77o.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <8b65902a0708220317t2b3dd01csef460a943ed2ef37@mail.gmail.com>

```
"Guilhem Bonnefille" <guilhem.bonnefille@gmail.com> writes:

> Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
> log in the Git repo, not on the SVN repo.
> Please, ignore me.

I do not think it is wrong to tack that to the commit message
you push it back to SVN... am I missing something?

```

## Eric Wong, 2007-08-23 05:05

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <20070823050555.GB4978@muzzle>
URL: https://gitlist.dev/e/20070823050555.GB4978%40muzzle
In-Reply-To: <7vir77i77o.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano <gitster@pobox.com> wrote:
> "Guilhem Bonnefille" <guilhem.bonnefille@gmail.com> writes:
> 
> > Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
> > log in the Git repo, not on the SVN repo.
> > Please, ignore me.
> 
> I do not think it is wrong to tack that to the commit message
> you push it back to SVN... am I missing something?

It's actually possible to add a revprop in SVN that is not immediately
visible to SVN users.

-- 
Eric Wong

```

## Richard MUSIL, 2007-08-23 08:51

Subject: Re: git-svn: commit author x commit committer issue
Message-ID: <46CD4A8D.9010509@st.com>
URL: https://gitlist.dev/e/46CD4A8D.9010509%40st.com
In-Reply-To: <20070823050555.GB4978@muzzle>

```
Eric Wong wrote:
> Junio C Hamano <gitster@pobox.com> wrote:
>> "Guilhem Bonnefille" <guilhem.bonnefille@gmail.com> writes:
>>
>>> Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
>>> log in the Git repo, not on the SVN repo.
>>> Please, ignore me.
>> I do not think it is wrong to tack that to the commit message
>> you push it back to SVN... am I missing something?
> 
> It's actually possible to add a revprop in SVN that is not immediately
> visible to SVN users.

I would say revprops would be great, but as of now, they are not by
default available on svn repo. Which makes their usage only optional for
git. (But for author info I believe this is acceptable.)

Richard

```
