[U-Boot] problem doing rebase in fresh git.denx.de/u-boot.git clone

Wolfgang Denk wd at denx.de
Fri Dec 12 20:55:58 CET 2008


Dear "Peter Vollmer",

In message <op.ul1xayil2rocvy at tomo.bln.innominate.local> you wrote:
>
> 1) Lets say this is a simplified part of the commit log after I cloned the  
> repo and created my branch with "git checkout -b bisect v2008.10"

But that's wrong. You said, you patches were based on v1.3.3 - then you must branch off v1.3.3:

	git-checkout -b your_branch v1.3.3


> tag_v1.3.3
> commitA
> commitB
> commitC
> tag_v2008.10

Will give:


tag_v1.3.3  x-- your_branch---+
commitA
commitB
commitC
tag_v2008.10

> 2) then I commit my own patches at the top with "git am  
> 0001-myPatch1.patch 0002-myPatch2.patch"
> 
> tag_v1.3.3
> commitA
> commitB
> commitC
> tag_v2008.10
> myPatch1
> myPatch2

That makes no sense, if your  patches  are  based  on  1.3.3  -  most
probably, they will not even apply correctly on top of v2008.10; what
you need is this:

tag_v1.3.3 x-- your_branch---+
commitA                   myPatch1
commitB                   myPatch2
commitC
tag_v2008.10


> 3) then I try to "git rebase -i v1.3.3" to reorder the commits in my  
> branch in the following way (which failed):

That's wrong again. Here you need to do a  "git  rebase  -i  master",
which  will  move  the point where you branched off the master branch
(marked in the pictures above with 'x') to the top of tree commit; if
successful, the result will then look like this:

> tag_v1.3.3
> commitA
> myPatch1
> commitB
> myPatch2
> commitC
> tag_v2008.10

tag_v1.3.3
commitA
commitB
commitC
tag_v2008.10 x-- your_branch---+
                          myPatch1'
                          myPatch2'


> 4) After that I wanted to do a git bisect between tag_v1.3.3 and  
> tag_v2008.10 to find the commit when my port stops working.

Using bisect makes absolutely no sense to me in this context.


> I see, this would move my patches from after tag_v1.3.3 up to HEAD, but  
> what I tried to accomplish was to distribute them back in the timeline to  
> make bisect work at each point between v1.3.3 and v2008.10.

You cannot go backward. You could only start  your  own  branch,  and
then  git-cherry-pick  one  patch  after  the  other  from the master
branch, and after each step clean up / add fixes as needed.

Then you can git-rebase -i your branch to consolidate patches.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The human mind  ordinarily  operates  at  only  ten  percent  of  its
capacity. The rest is overhead for the operating system.


More information about the U-Boot mailing list