git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harry Johnson <hjohnson@viasic.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org
Subject: Re: noob question
Date: Fri, 14 Jan 2011 16:32:53 -0500	[thread overview]
Message-ID: <AANLkTi=gqfb1KDGZ_h2bbxH7HyBw70JkVnO-Xi98OSCu@mail.gmail.com> (raw)
In-Reply-To: <201101141210.25523.trast@student.ethz.ch>

>> I have used git-svn to create a git repo from our subversion repo. I
>> have done this as user foo which is just an account that is used for
>> doing central builds. I have then cloned this as repo as myself,
>> harry. My thought is that the repo owned by foo would be a central
>> repo that all of the developers, including myself, could clone and to
>> which  we could then 'git push' our changes.
> [...]
>> when checking the git log is that while the changes I made and checked
>> into my repo clearly showed me as the author, the same changes after
>> being pushed to foo's repo showed a different author.
>>
>> So two things.. First should the author have been preserved? How can I
>> make sure that it is?
>
> Yes, absolutely, and since the author is encoded in the commit objects
> it's impossible to change it without also changing the commit sha1s.
>
> Can you spell your experiments in actual commands and output snippets
> so we can see what happened?
>
> Did you ever run 'git svn dcommit', 'git rebase', 'git commit --amend'
> or similar in foo's repo?  All of these rewrite commits.  As part of
> their rewriting they set the *committer* to the identity of the
> current user.  'git svn dcommit' sets author&committer to the identity
> coming back from SVN.

Ah that does sound like the issue then. I did in fact do a git svn
dcommit to commit the changes from the foo repo to our subversion
repo. If dcommit rewrites the commit changing the author then that
would explain it.

So I did a new test. I made a change and committed it to my local
repo. I then did a git pull to bring my repo in sync with the foo
repo, then did a push to the foo repo. Before doing anything else I
checked the author of my changes in the foo repo and sure enough I am
the author! Yay for that.

Now I try to git svn dcommit and I receive the following error:
Merge conflict during commit: File or directory 'bar' is out of date.
Try updating ...

So I do a git svn rebase, followed by git svn dcommit which works. Now
looking at git log I see that my changes are 'authored' by some else.
All that to say that you seem to hit the nail on the head and the git
svn rebase and git svn dcommit are rewriting the commits and changing
the author.

If we do indeed adopt git as our version control system then we would
freeze the subversion repo and not worry about git svn any further so
I think this is ultimately a non-issue and just something we will deal
with during this hybrid testing period.

Thanks!!
-Harry

>
> --
> Thomas Rast
> trast@{inf,student}.ethz.ch
>

  reply	other threads:[~2011-01-14 21:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 23:58 noob question Harry Johnson
2011-01-14 11:10 ` Thomas Rast
2011-01-14 21:32   ` Harry Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-21  1:07 Noob Question awingnut
2012-12-21  1:43 ` Andrew Ardill
2012-12-21 13:27   ` W T Riker
2012-12-21 22:38     ` Andrew Ardill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=gqfb1KDGZ_h2bbxH7HyBw70JkVnO-Xi98OSCu@mail.gmail.com' \
    --to=hjohnson@viasic.com \
    --cc=git@vger.kernel.org \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).