git merge - git cherry-pick being ancestor-aware, not just applying a patch? -


it sure nice if merge-like cleverness , awareness of common ancestors available in cherry-pick. possible?

suppose have situation. have development commits made dev , cherry-picked release. [1]

x----y---a1---a2---b---z   dev   \    \----b'                 release   a1: remove function foo()  a2: re-add function foo() (ooops, needed) , change function bar()      (a1 , a2 listed becuase 2 commits, attempts, fix same bug.)  b:  modify function foo()  b': b cherry-picked release branch  x, y, z: changes touching unrelated files. no conflicts here. 

now want cherry-pick a1 , a2 release branch. obviously, cannot cherry-pick them because there conflict on deletion/modification of foo().

but smart person see how a1 , a2 delete , re-add foo() , how can indeed merged release branch. , make algorithm take commits dev occur after a1,a2 in release, go commit before that, , re-apply a1, a2, b in order applied dev take final state of files , put after b' on release branch. (because on release branch, no history modification ever allowed.)

and that's fine , well, gets hairy pretty quickly. sure nice if merge-like cleverness , awareness of common ancestors available in cherry-pick. possible?

steve

[1] know think ridiculous. please don't bother telling me that. honestly, more complicated think , there reasons it. have tried keep things simple question , it's not in anybody's best interest have multi-page explanation of why, in case, right thing do.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -