[U-Boot] [PATCH/RFC] Fixup for directory reorganization patch series

Peter Tyser ptyser at xes-inc.com
Tue Apr 13 00:18:08 CEST 2010


On Tue, 2010-04-13 at 07:56 +1000, Graeme Russ wrote:
> On Tue, Apr 13, 2010 at 6:21 AM, Peter Tyser <ptyser at xes-inc.com> wrote:
> > Hi Wolfgang,
> >
> >> In message <1271045621-17393-1-git-send-email-ptyser at xes-inc.com> you wrote:
> 
> [snip]
> 
> >>
> >> So far nobody else complained, so I think when you post the next
> >> version of this series I will apply it directly to "master".
> >
> > Great!  I'll repost v4 later tonight.
> >
> 
> I have a quick (stacked)git question - I have nearly 30 patches in  my
> stg stack (26 are pending application to master). Is git smart enough to
> apply these patches to the new file locations or will I have to spend some
> time adjusting each patch? I just want to know if I need to set aside some
> time to redo the patch series.

I'm pretty sure that git isn't that smart.  For example, between v2 and
v3 of the reorganization patches the ppc440 I2C driver moved from
cpu/ppc4xx/i2c.c to drivers/i2c/ppc4xx_i2c.c.  When I rebased the v2
patch on the latest U-Boot, git wasn't smart enough to know that
drivers/i2c/ppc4xx_i2c.c should be modified instead of cpu/ppc4xx/i2c.c
and I had to manually make the change.  I imagine the same thing will
happen to you unfortunately.

On the plus side, migrating your changes should be pretty easy.
Hopefully you can just update the paths in your patches to reflect the
new file locations, then re-apply them to a clean, up-to-date U-Boot
tree.  Something like the following may automate the process (untested):

perl -p -i -e 's/\-\-\- a\/cpu\/i386/\-\-\- a\/arch\/i386\/cpu/' *
perl -p -i -e 's/\+\+\+ b\/cpu\/i386/\+\+\+ b\/arch\/i386\/cpu/' *
perl -p -i -e 's/\-\-\- a\/lib_i386/\-\-\- a\/arch\/i386\/lib/' *
perl -p -i -e 's/\+\+\+ b\/lib_i386/\+\+\+ b\/arch\/i386\/lib/' *
perl -p -i -e 's/\-\-\- a\/lib_generic/\-\-\- a\/lib/' *
perl -p -i -e 's/\+\+\+ b\/lib_generic/\+\+\+ b\/lib/' *
...

Hopefully a few regular expressions can fix up most of the changes, but
I imagine there might be a few manual tweaks that need to be made too.

When you rebase your changes it would be nice if you mentioned how it
went and how you did it as I imagine others will have this same issue to
some degree.

Best,
Peter




More information about the U-Boot mailing list