From: Catalin Marinas <catalin.marinas@arm.com>
To: Shawn Pearce <spearce@spearce.org>
Cc: "Karl Hasselström" <kha@treskal.com>, git@vger.kernel.org
Subject: Re: bug?: stgit creates (unneccessary?) conflicts when pulling
Date: Wed, 01 Mar 2006 10:59:10 +0000 [thread overview]
Message-ID: <tnx1wxmig75.fsf@arm.com> (raw)
In-Reply-To: <20060227222600.GA11797@spearce.org> (Shawn Pearce's message of "Mon, 27 Feb 2006 17:26:00 -0500")
Shawn Pearce <spearce@spearce.org> wrote:
> Karl Hasselstr?m <kha@treskal.com> wrote:
>> If I make a patch series where more than one patch touches the same
>> line, I get a lot of merge errors when upstream has accepted them and
>> I try to merge them back.
>
> When pg grabs its (possibly remote) parent ("stg pull" aka pg-rebase)
> we try to push down PatchA. If PatchA fails to push cleanly we'll
> pop it off and try to push PatchA + PatchB. If that pushes cleanly
> then we fold the content of PatchA into PatchB, effectively making
> PatchA part of PatchB. If PatchA + PatchB failed to push down
> cleanly then we pop both and retry pushing PatchA + PatchB + PatchC.
How do you solve the situation where only PatchA, PatchC and PatchE
were merged, B and D still pending? Trying combinations of patches is
not a good idea.
As I said, if you have a big number of patches this might be pretty
slow. Have a look at my patch for trying the reversed patches in
reverse order. It seems to solve this problem for most of the
cases. There are cases when this method would fail like adjacent
changes made by third-party patches that break the context of the git
patches and git-apply would fail. An addition to this would be to try
a diff3 merge with the reversed patch but I don't think it's worth
since it would become much slower.
> If that pushes down cleanly then we make PatchA and PatchB officially
> part of PatchC.
I don't agree with this. For example, patches A, B and C change the
same line in file1 but patch A also changes file2 and patch B changed
file3. With your approach, merging A+B+C succeeds and you make A and B
part of C and hence move the changed to file2 and file3 in patch C.
The above can happen when the maintainer only merges part of the patch
or simply decides to merge patch C only and manually solve the
conflict in file1 (since patch C is based on the context from patches
A+B).
--
Catalin
next prev parent reply other threads:[~2006-03-01 10:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 20:42 bug?: stgit creates (unneccessary?) conflicts when pulling Karl Hasselström
2006-02-27 21:45 ` Sam Vilain
2006-02-27 22:17 ` Catalin Marinas
2006-02-28 15:00 ` Catalin Marinas
2006-02-28 18:53 ` Catalin Marinas
2006-02-28 22:45 ` Catalin Marinas
2006-03-01 17:39 ` Chuck Lever
2006-03-01 17:53 ` Catalin Marinas
2006-03-03 14:13 ` Karl Hasselström
2006-03-03 21:57 ` Catalin Marinas
2006-03-03 14:24 ` Karl Hasselström
2006-03-03 22:07 ` Catalin Marinas
2006-02-27 22:26 ` Shawn Pearce
2006-03-01 10:59 ` Catalin Marinas [this message]
2006-03-01 14:51 ` Shawn Pearce
2006-03-01 15:08 ` Catalin Marinas
2006-03-01 15:50 ` Shawn Pearce
2006-03-09 22:00 ` Catalin Marinas
2006-03-09 23:20 ` Junio C Hamano
2006-03-10 11:13 ` Catalin Marinas
2006-03-11 6:46 ` Junio C Hamano
2006-03-10 16:23 ` Shawn Pearce
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=tnx1wxmig75.fsf@arm.com \
--to=catalin.marinas@arm.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
--cc=spearce@spearce.org \
/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.