git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote
@ 2016-08-23 18:34 Leandro Lucarella
  2016-08-23 18:38 ` Leandro Lucarella
  2016-08-23 21:26 ` Stefan Beller
  0 siblings, 2 replies; 4+ messages in thread
From: Leandro Lucarella @ 2016-08-23 18:34 UTC (permalink / raw)
  To: git

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

  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.

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.

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.

$ git --version
git version 2.9.3

(running under Ubuntu 14.04)

Please CC me, and thanks a lot in advance!

-- 
Leandro Lucarella
Technical Development Lead
Sociomantic Labs GmbH <http://www.sociomantic.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote
  2016-08-23 18:34 Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote Leandro Lucarella
@ 2016-08-23 18:38 ` Leandro Lucarella
  2016-08-23 23:30   ` Stefan Beller
  2016-08-23 21:26 ` Stefan Beller
  1 sibling, 1 reply; 4+ messages in thread
From: Leandro Lucarella @ 2016-08-23 18:38 UTC (permalink / raw)
  To: git

On Tue, 23 Aug 2016 20:34:46 +0200
Leandro Lucarella <leandro.lucarella@sociomantic.com> wrote:
> This even happens after doing a:
> 
> git submodule deinit <module>
> rm -fr <module>
> rm -fr .git/modules/<module>
> git submodule update --init

One more thing, doing a clean new clone seems to work, but I have this
issue in many many repos, which are old clones, from before Git had the
ability to check for submodules. Could it be some incompatibility in
old clones with this? Is there anything I can look for in the .git/
directory or elsewhere to fix them?

Thanks again!

-- 
Leandro Lucarella
Technical Development Lead
Sociomantic Labs GmbH <http://www.sociomantic.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote
  2016-08-23 18:34 Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote Leandro Lucarella
  2016-08-23 18:38 ` Leandro Lucarella
@ 2016-08-23 21:26 ` Stefan Beller
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Beller @ 2016-08-23 21:26 UTC (permalink / raw)
  To: Leandro Lucarella; +Cc: git@vger.kernel.org

On Tue, Aug 23, 2016 at 11:34 AM, Leandro Lucarella
<leandro.lucarella@sociomantic.com> wrote:
> 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

>
>   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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote
  2016-08-23 18:38 ` Leandro Lucarella
@ 2016-08-23 23:30   ` Stefan Beller
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Beller @ 2016-08-23 23:30 UTC (permalink / raw)
  To: Leandro Lucarella; +Cc: git@vger.kernel.org

On Tue, Aug 23, 2016 at 11:38 AM, Leandro Lucarella
<leandro.lucarella@sociomantic.com> wrote:
> On Tue, 23 Aug 2016 20:34:46 +0200
> Leandro Lucarella <leandro.lucarella@sociomantic.com> wrote:
>> This even happens after doing a:
>>
>> git submodule deinit <module>
>> rm -fr <module>
>> rm -fr .git/modules/<module>
>> git submodule update --init
>
> One more thing, doing a clean new clone seems to work, but I have this
> issue in many many repos, which are old clones, from before Git had the
> ability to check for submodules. Could it be some incompatibility in
> old clones with this? Is there anything I can look for in the .git/
> directory or elsewhere to fix them?

Check if push.recurseSubmodules is set?

>
> Thanks again!
>
> --
> Leandro Lucarella
> Technical Development Lead
> Sociomantic Labs GmbH <http://www.sociomantic.com>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-23 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 18:34 Getting "The following submodule paths contain changes that can not be found on any remote" when they are in the remote Leandro Lucarella
2016-08-23 18:38 ` Leandro Lucarella
2016-08-23 23:30   ` Stefan Beller
2016-08-23 21:26 ` Stefan Beller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).