All of lore.kernel.org
 help / color / mirror / Atom feed
* Merge priority
@ 2009-11-26 12:44 Howard Miller
  2009-11-26 15:42 ` Alex Riesen
  2009-11-26 16:22 ` Martin Langhoff
  0 siblings, 2 replies; 4+ messages in thread
From: Howard Miller @ 2009-11-26 12:44 UTC (permalink / raw)
  To: git

I'm not sure this is even a sensible question....

I have a whole bunch of customer branches with all manner of local
tweaks and modifications. I also have a stable branch with all my
security patches and bug fixes. They do share common ancestry.

I now want to update all my customer branches with the latest fixes
and patches. Naively, I would just check out each branch and merge the
stable branch - job done. However, is it sensible to ask if there is a
way to say that the stable branch is more important if there are
conflicts. Or should I be using rebase instead (which I still don't
really understand). I'm trying to reduce my workload as there are
loads of branches to do.

Cheers :-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Merge priority
  2009-11-26 12:44 Merge priority Howard Miller
@ 2009-11-26 15:42 ` Alex Riesen
  2009-11-26 19:47   ` Junio C Hamano
  2009-11-26 16:22 ` Martin Langhoff
  1 sibling, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2009-11-26 15:42 UTC (permalink / raw)
  To: Howard Miller; +Cc: git

On Thu, Nov 26, 2009 at 13:44, Howard Miller <howard@e-learndesign.co.uk> wrote:
> I now want to update all my customer branches with the latest fixes
> and patches. Naively, I would just check out each branch and merge the
> stable branch - job done. However, is it sensible to ask if there is a
> way to say that the stable branch is more important if there are
> conflicts.

No, all branches are equal. Besides, are you sure it is safe to just take
your stable version of the code in a conflict? Maybe the stable code uses
something a customer branch renamed or removed?

You can take a look at rerere, though. It should help resolving repeating
conflicts  by recording a resolution of your choice.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Merge priority
  2009-11-26 12:44 Merge priority Howard Miller
  2009-11-26 15:42 ` Alex Riesen
@ 2009-11-26 16:22 ` Martin Langhoff
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Langhoff @ 2009-11-26 16:22 UTC (permalink / raw)
  To: Howard Miller; +Cc: git

On Thu, Nov 26, 2009 at 1:44 PM, Howard Miller
<howard@e-learndesign.co.uk> wrote:
> I now want to update all my customer branches with the latest fixes
> and patches. Naively, I would just check out each branch and merge the
> stable branch - job done.

Yep, that's what I'd do.

> However, is it sensible to ask if there is a
> way to say that the stable branch is more important if there are
> conflicts.

Not really. The git approach is to assume that... when there is a
conflict, you must look into it. A human needs to take a decision...

> Or should I be using rebase instead (which I still don't
> really understand). I'm trying to reduce my workload as there are
> loads of branches to do.

No, rebase will increase the load and complexity.

cheers,



m
-- 
 martin.langhoff@gmail.com
 martin@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Merge priority
  2009-11-26 15:42 ` Alex Riesen
@ 2009-11-26 19:47   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-11-26 19:47 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Howard Miller, git

Alex Riesen <raa.lkml@gmail.com> writes:

> You can take a look at rerere, though. It should help resolving repeating
> conflicts  by recording a resolution of your choice.

Use of rerere often helps but there is a caveat.

Even if two branches (e.g. 'master' and 'maint') currently has the same
tree, the desired outcome of merging the same commit into them could be
different depending on the purpose of these branches.  You may want to
resolve a conflicted merge into 'maint' more conservatively than the way
you would resolve the exact same merge into 'master'.

Imagine a case where 'master' branch added a better helper functions in
other files, but they are not in 'maint' yet, and the conflicted part
could be resolved better if you made it call these newer helper functions
available only in 'master'.

Unfortunately the conflicts would look exactly the same to rerere, so if
you record the result of the merge to 'master', replaying that resolution
while merging the same commit to 'maint' would produce undesirable result.

As to "does the aggregated result make sense if you blindly add changes in
'stable' for only conflicted parts to an automerge result?", which was
your other point, you may refer your readers to Avery's recent updates to
resurrect -Xours option to "git merge".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-26 19:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-26 12:44 Merge priority Howard Miller
2009-11-26 15:42 ` Alex Riesen
2009-11-26 19:47   ` Junio C Hamano
2009-11-26 16:22 ` Martin Langhoff

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.