[U-Boot] Attn Maintainers: git advise needed (how to fix messed up repo)

Graeme Russ graeme.russ at gmail.com
Tue Nov 29 04:35:24 CET 2011


Hi Mike,

On Tue, Nov 29, 2011 at 2:31 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Monday 28 November 2011 19:02:20 Graeme Russ wrote:
>> > cd Source/U-Boot/x86 (my local version of the u-boot-x86 repo)
>> > git fetch u-boot (as per the 'new' methodology of not having a seperate
>> > u-boot branch)
>> > git checkout master
>> > git rebase u-boot/master
>> > git push ssh://gu-x86@git.denx.de/u-boot-x86
>> > git checkout next
>> > git rebase master
>> > git push ssh://gu-x86@git.denx.de/u-boot-x86
>
> ok, i've read the official recommended workflow [1].  it seems to contradict
> itself.  for example, it starts with:
>        Philosophy of custodian trees
>        ... it is the custodian's responsibility to provide a permanently
>        accessible, consistent view of his repository to users.
>
> i read that as saying "no rewriting of published history".  but later on it
> says to do just that:
>        Tips for maintaining custodian trees
>        - Keep in sync with the upstream repository by pulling it.
>        - Rebase the master, testing and any "work in progress" branches to the
>        ${upstream}/master remote branch.
>        - Push the appropriate branch(es) to the denx.de repo:
>                - Pushing the testing and/or rebased master branches often requires
>                the -f force flag. This is because the state/content/order of the
>                patches in the branch changed due to the rebase operations.
>
> so i guess your example workflow is fine, you just need to use the --force flag.
> and you should specify the branches to push rather than leaving that to be
> implicit.  so change:
>        git push ssh://gu-x86@git.denx.de/u-boot-x86
> to:
>        git push --force ssh://gu-x86@git.denx.de/u-boot-x86 next
>        git push --force ssh://gu-x86@git.denx.de/u-boot-x86 master
>
>> Do the above periodically so anyone working off u-boot-x86 can keep
>> up-to-date
>
> the expected behavior of downstream users is apparently to always fetch+rebase
> rather than fetch+merge (what "pull" normally does).  this is pretty unusual
> (and in most git circles, unforgivable as the "default" workflow).  but as i'm

OK, so what would be a more acceptable workflow?

> not a consumer of any of these trees except Wolfgang's, i'm not going to argue
> over it.  so your x86 users have to do (assuming they've cloned your tree):
>        git fetch
>        git rebase origin/master
>
> instead of the more normal:
>        git pull

Ah, actually I think git pull is preferable...

And just quickly back to the problem at hand - How do I fix the 'duplicate
commits' problem I already have?

Regards,

Graeme


More information about the U-Boot mailing list