All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Baumann <waste.manager@gmx.de>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Miles Bader <miles@gnu.org>,
	Raymond Auge <raymond.auge@liferay.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: are hashes calculated from data
Date: Fri, 2 Apr 2010 09:08:59 +0200	[thread overview]
Message-ID: <20100402070859.GD14999@m62s10.vlinux.de> (raw)
In-Reply-To: <z2i32541b131004012349na7af3571j67c3a33e3e3ba78@mail.gmail.com>

On Fri, Apr 02, 2010 at 02:49:25AM -0400, Avery Pennarun wrote:
> On Fri, Apr 2, 2010 at 2:10 AM, Peter Baumann <waste.manager@gmx.de> wrote:
> > On Fri, Apr 02, 2010 at 12:48:44AM -0400, Avery Pennarun wrote:
> >>        # configure your git-svn so that all its branches are under remotes/svn/*
> >>        git fetch origin
> >>        git svn fetch --fetch-all
> >>        for each branch in remotes/svn/*
> >>            git checkout remotes/svn/$branch   # detaches HEAD
> >>            git merge --no-ff origin/$branch
> >>            git svn dcommit   # replaces merge commit
> >>            git checkout origin/$branch
> >>            git merge remotes/svn/$branch
> >>            git push origin HEAD:$branch
> >>        git push origin refs/remotes/svn/*:refs/heads/svn/*
> >
> > If I understand you correctly, this will commit only the the merge to svn
> > and won't show all the commits the developer made (because of the --no-ff).
> > From a SVN standpoint isn't it the same as doing the following?
> >
> >        git checkout remotes/svn/$branch        # to deatch the HEAD
> >        git merge --squash  origin/$branch
> >        git svn dcommit
> >
> > I asked because in my workflow I can't to afford lossing the single commits.
> 
> No, not quite the same.
> 
> When git-svn replaces your merge commit with a new commit (as part of
> the 'git svn dcommit' step) the new commit *stays* a merge commit in
> git.  That means it has two parents: the svn parent commit, and the
> commit that you merged from in the first place.
> 
> So what happens is that svn will see only a single commit, but your
> git history remains intact and git push/pulling will continue working
> as you expect.
> 

Ah. Ok. So I actually was true, meaning "from a SVN standpoint", I just
expressed myself not clearly.

> If you really need svn to see every individual commit, then you're out
> of luck.  The only way to do it is to rebase every time you want to
> commit to svn.  git-svn then replaces every single one of your commits
> (essentially another rebase, so it can add the git-svn: tags to the
> commit message) which makes push/pulling between git repos impossible.
> 
> So those are your two choices.  Personally, I like my way as a
> transition plan, because the git repo keeps the precise history
> (including forks and merges), while the svn keeps *working* for the
> stragglers who want to keep using it.
> 

Thx for your explanation,

Peter

      reply	other threads:[~2010-04-02  7:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02  2:31 are hashes calculated from data Raymond Auge
2010-04-02  2:50 ` Avery Pennarun
2010-04-02  4:22   ` Miles Bader
2010-04-02  4:48     ` Avery Pennarun
2010-04-02  6:10       ` Peter Baumann
2010-04-02  6:49         ` Avery Pennarun
2010-04-02  7:08           ` Peter Baumann [this message]

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=20100402070859.GD14999@m62s10.vlinux.de \
    --to=waste.manager@gmx.de \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=miles@gnu.org \
    --cc=raymond.auge@liferay.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.