public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sam Vilain <sam@vilain•net>
To: JM Ibanez <jm@orangeandbronze•com>
Cc: git <git@vger•kernel.org>
Subject: Re: Stripping 'git-svn-id' from commit messages, and switching to svn.noMetadata
Date: Fri, 25 Jan 2008 10:14:17 +1300	[thread overview]
Message-ID: <4798FFA9.7010601@vilain.net> (raw)
In-Reply-To: <87wspzobnq.fsf@adler.orangeandbronze.com>

JM Ibanez wrote:
> Actually, I forgot to mention that I already have grafts between the two
> to track merges I performed previously. So, in fact, the history looks
> like something this:
> 
>      A -- B -- C -- D -- E -- a -- b -- c -- d -- e -- f -- m3
>                          \         \          \             /
>                           \         \          \   /-------+
>      A'-- B'-- C'-- D'-- E'-- x -- y -- m1-- z -- m2
> 
> 
> where x, m1, m2, and m3 are squashed merge commits + grafts.
> 
> After git filter-branch with a graft of x to E, I get x having two
> parents as what is needed *but* because the parent IDs are part of the
> commit object, I now get x' y', etc, something like this:
> 
> 
> 
>      A -- B -- C -- D -- E -- a -- b -- c -- ...
>                          |         |
>                          |         |
>                          |         +--- m1'- z'-- m2' -- ...
>                          \         \
>                           \         \
>                            -- x -- y -- m1-- z -- ...
> 
> 
> sort of. In any case, I get duplicate commits of m1, z, etc. after the
> primary graft point. Is this expected?

I think you need to use a parent filter that looks up the old commit ID
in the grafts, and adjusts the parents accordingly.  I don't think I'd
be able to nail it down any further than that without actually trying.

I think the intent of git filter-branch's grafting support is that this
shouldn't happen, so if you can produce a test case then the bug can
likely be fixed.

Sam.

  reply	other threads:[~2008-01-24 21:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23 21:00 Stripping 'git-svn-id' from commit messages, and switching to svn.noMetadata JM Ibanez
2008-01-24  0:07 ` Sam Vilain
2008-01-24  8:44   ` JM Ibanez
2008-01-24 21:14     ` Sam Vilain [this message]
2008-01-24 17:36   ` Pascal Obry
2008-01-24 21:19     ` Sam Vilain
2008-01-25 20:03       ` Pascal Obry

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=4798FFA9.7010601@vilain.net \
    --to=sam@vilain$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jm@orangeandbronze$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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