A Method of Breaking Git

Elliott Mitchell ehem+openwrt at m5p.com
Thu Oct 26 14:21:10 PDT 2023

On Tue, Oct 24, 2023 at 02:21:35PM +0200, Bjørn Mork wrote:
> Christian Marangi <ansuelsmth at gmail.com> writes:
> > Anyway I have also found this [1]... if it does actually works, it might be
> > THE solution to our specific problem. Wonder if someone can test it on a
> > sample repository.
> >
> > [1] https://devblogs.microsoft.com/oldnewthing/20190919-00/?p=102904
> Nice!  Seems to work.  Tried this in an almost uptodate OpenWrt main
> branch:
>    git checkout -b dup
>    git mv target/linux/ramips/mt7621/config-5.15 target/linux/ramips/mt7621/config-6.1
>    git commit -s -m 'create config-6.1 based on config-5.15'
>    git checkout HEAD~  target/linux/ramips/mt7621/config-5.15
>    git commit -s -m 'restore config-5.15'
>    git checkout -
>    git merge --no-ff dup

Well I've now played with this some and found a fair bit I like, but
eventually found some troublesome issues.

If one has a patch/commit which was originally against config-5.15 and
then rebase onto dup, the patch/commit will successfully move to
config-6.1.  This is good.

If one rebases that after the merge commit, the patch/commit will remain
on config-5.15.  This is bad.

If config-5.15 is removed after the merge commit, and the testing commit
is rebased after, it will move to config-6.1.

Overall a definite improvement, but certainly not perfect.

(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg at m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445

More information about the openwrt-devel mailing list