FWIW: I have major problems when rebasing if that rebase runs across the point where a submodule is added. Every file that was removed and replaced by the submodule generates a conflict. Only solution I could find was to whack the subdirectory containing the files-to-be-replaced and work thru it (and it isn't an easy process). Rather painful, which is why rebasing the "remove ORTE" PR has been a nightmare.
> On Feb 7, 2020, at 7:31 AM, Jeff Squyres (jsquyres) via devel > <devel@lists.open-mpi.org> wrote: > > On Feb 7, 2020, at 4:27 AM, Brice Goglin via devel <devel@lists.open-mpi.org> > wrote: >> >> PR#7367 was initially on top of PR #7366. When Jeff merged PR#7366, I >> rebased my #7367 with git prrs and got this error: >> >> $ git prrs origin master >> From >> https://github.com/open-mpi/ompi >> >> * branch master -> FETCH_HEAD >> Fetching submodule opal/mca/hwloc/hwloc2/hwloc >> fatal: cannot rebase with locally recorded submodule modifications >> >> I didn't touch the hwloc submodule as far as I can see. The hwloc submodule >> also didn't change in origin/master between before and after the rebasing. > > Huh. I can't see from this what happened; I have no insight to offer here, > sorry... > >> $ git submodule status >> 38433c0f5fae0b761bd20e7b928c77f3ff2e76dc opal/mca/hwloc/hwloc2/hwloc >> (hwloc-2.1.0rc2-33-g38433c0f) > > I see this in my ompi clone as well (i.e., it's where the master/HEAD hwloc > submodule is pointing). > >> opal/mca/hwloc/hwloc2/hwloc $ git status >> HEAD detached from f1a2e22a >> nothing to commit, working tree clean >> >> I am not sure what's this "HEAD detached ..." is doing here. > > If you look at the graph log in the opal/mca/hwloc/hwloc2/hwloc tree, you'll > see: > > * 03d42600 (origin/v2.1) doxy: add a ref to envvar from the XML section > ...a bunch more commits... > * 38433c0f (HEAD) .gitignore: add config/ltmain.sh.orig > ...a bunch more commits... > * f1a2e22a (tag: hwloc-2.1.0rc2, tag: hwloc-2.1.0) contrib/windows: update > README > > Meaning: > - 03d42600 is the head of the "v2.1" branch in the hwloc repo > - 38433c0f is where the submodule is pointing (i.e., local HEAD) > - f1a2e22a is the last tag before that > > So I think the "HEAD detached" means that the HEAD is not pointing to a named > commit (i.e., there's no tags or branches pointing to 38433c0f). > >> I seem to be able to reproduce the issue in my master branch by doing "git >> reset --hard HEAD^". git prrs will then fail the same. >> >> I worked around the issue by manually reapplying all commits from my PR on >> top of master with git cherry-pick, but I'd like to understand what's going >> on. It looks like my submodule is clean but not clean enough for a rebase? > > I haven't had problems with rebasing and submodules; I'm not sure what I'm > doing different than you. > > -- > Jeff Squyres > jsquy...@cisco.com >