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

Re: Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote

From
Stefan Beller <sbeller@google.com>
Date
Aug 23, 2016, 21:26 UTC
Message-ID
<CAGZ79kbkyupBJfvyX3Hj_R5ZW36+3ufOnnLC-Dpic40nPJAxDA@mail.gmail.com>
In-Reply-To
<20160823203446.40abfd37@labs-064.localdomain>

On Tue, Aug 23, 2016 at 11:34 AM, Leandro Lucarella <leandro.lucarella@sociomantic.com> wrote:

Show 10 quoted lines
> Hi, I'm getting very often, but not always, with many different
> projects using submodules, the message:
>
>   The following submodule paths contain changes that can
>   not be found on any remote:
>     <module>
>
>   Please try
>
>         git push --recurse-submodules=on-demand

Check if push.recurseSubmodules is set (in the project, globally, in the home dir?)

    git config --list | grep push.recurseSubmodules
Show 18 quoted lines
>
>   or cd to the path and use
>
>         git push
>
>   to push them to a remote.
>
>   fatal: Aborting.
>
> This even happens after doing a:
>
> git submodule deinit <module>
> rm -fr <module>
> rm -fr .git/modules/<module>
> git submodule update --init
>
> So I am getting the reference from the remote, but when pushing a new
> change (that doesn't touch the submodules) I keep getting this error.

So the submodule did not change, but you still get the error? That sounds like a bug.

Can you provide a sample repository that demonstrates this bug? Maybe there are 'dangling' submodule pointers in past commits that trigger this problem?

>
> I tried to get more information about why this is happening but I
> couldn't. Googling didn't help either, so I'm resorting to ask here.

If you are sure it is bug and not your fault, you can overwrite the push.recurseSubmodules setting locally in your repository to be "no" or "on-demand", see the git config documentation[1].

[1] e.g. https://www.kernel.org/pub/software/scm/git/docs/git-config.html
>
> I would also like to report a tiny bug, when using push --quiet, I do
> get all the message above except for the <module> name, which is quite
> confusing.
This sounds like a second bug.
See https://github.com/git/git/blob/master/transport.c#L767
So there are a few issues:
* the printf in the loop should be an fprintf(stderr,...)  for consistency.
* die_with_unpushed_submodules that is called from transport_push
  doesn't respect the transport->verbose setting.

The second bug can be explained with these issues; the first one could hint at a bug in find_unpushed_submodules in submodule.c

Thanks for reporting a bug! Stefan

Previous: Leandro LucarellaNext: Leandro Lucarella
Message 2 of 4 in “Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote”
  1. Leandro LucarellaAug 23, 2016
  2. Stefan BellerAug 23, 2016
  3. Leandro LucarellaAug 23, 2016
  4. Stefan BellerAug 23, 2016

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.