git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: fatal: cannot rebase with locally recorded submodule modifications

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Nov 13, 2020, 23:47 UTC
Message-ID
<20D6104D-CA02-4CE4-A1C0-2F9386DEDA3B@gmail.com>
In-Reply-To
<660c39af-d0f2-5e4c-66a0-5c78b646b023@free.fr>
Hi Brice,
Show 16 quoted lines
> Le 7 févr. 2020 à 15:50, Brice Goglin <bgoglin@free.fr> a écrit :
> 
> Hello
> 
> I don't understand why git pull --rebase --recurse-submodules fails after a git reset --hard
> to the previous commit. I didn't touch the submodule, it's supposed to be clean:
> 
> $ git clone --recursive git@github.com:open-mpi/ompi.git
> [...]
> $ git reset --hard HEAD^
> HEAD is now at 395e2c9d8f Merge pull request #7364 from awlauria/fix_compile
> $ git pull --rebase --recurse-submodules
> Fetching submodule opal/mca/hwloc/hwloc2/hwloc
> fatal: cannot rebase with locally recorded submodule modifications
> 
> Why is failing here?

It's failing because there is a bug in the code for 'git pull --rebase --recurse-submodules' when the current branch and its remote-tracking counterpart have no fork-point, which seem to be the situation happening here.

I've just finished a patch series that fixes this bug. You can take a look at it here: https://github.com/gitgitgadget/git/pull/789. I will send it to the list shortly, and will CC you when I do.

Cheers,
Philippe.
Previous: Philippe Blain
Message 4 of 4 in “fatal: cannot rebase with locally recorded submodule modifications”
  1. Brice GoglinFeb 7, 2020
  2. Shourya ShuklaFeb 7, 2020
  3. Philippe BlainNov 14, 2020
  4. Philippe BlainNov 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.