git - Script to find a patch set between two branches -



git - Script to find a patch set between two branches -

i'm aware git merge-base gets best mutual parent 2 branches. how patch set, merged, gives me patch apply 1 of branches poing other branch is?

git development non-linear, means find many of these patch sets. i'm aiming one.

the base case of patch set no merges occurred whitin new branch, , path branch head mutual ancestor can used patch set (is one).

the inductive case when merge found in path between ancestor , branch head:

all commits in path between head , sub-merge included. the sub-merge commit included find closest sub-ancestor kid of ancestor. all commits between sub-merge , sub-ancestor ignored. the shortest patch set between sub-ancestor , ancestor united set. if @ step 3., not sub-ancestor found, include commits of branch kid of ancestor (merge branch doesn't include our ancestor).

this complex operation git does. trying reproduce patch set difficult. how script accomplish this?

your question hard me parse, sounds lot asking how git rebase works? format patch generates

git format-patch -k --stdout --full-index --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter branch1...branch2

git version-control graph git-merge

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -