ni / nilrt

Tools to build NI Linux RT distribution.
MIT License
80 stars 69 forks source link

upstream_merge: new argument enabling submodule auto-checkouts #211

Closed dylan-matthew-turner closed 1 year ago

dylan-matthew-turner commented 1 year ago

When performing an upstream merge on a non-default release, one must perform a git checkout on each submodule as the local branches are not auto-grabbed; they are simply set to a remote commit.

This adds optional functionality to upstream_merge.sh which forces a git checkout on the provided local branch from repos.conf before proceeding with a sanity check and the rest of the operations.

Default behavior of not doing this checkout is preserved and helpful messages have been added when this new behavior is being used. The messages look like this in practice:

sources/bitbake
    Non-default checkout enabled. Attempting to do `git checkout nilrt/master/kirkstone`.
    Checkout succeeded.

    Branch dev/automerge/ni already exists
    Delete Branch(d)/Skip Repo(s)/Cancel Merge(c)?
amstewart commented 1 year ago

You've got two identical commits in this patchset now. Did you mean to squash them into one?