From: Junio C Hamano <gitster@pobox.com>
To: Scott Johnson <scott.johnson@arilinc.com>
Cc: git@vger.kernel.org
Subject: Re: push.recurseSubmodules=check doesn't consider tags
Date: Wed, 12 Jun 2019 10:26:01 -0700 [thread overview]
Message-ID: <xmqqef3yk95i.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <62F6F2E3-FAED-4EE9-BDB8-D484252A845F@arilinc.com> (Scott Johnson's message of "Tue, 11 Jun 2019 19:04:40 -0700")
Scott Johnson <scott.johnson@arilinc.com> writes:
> I occasionally rebase my submodules. I realize the danger (historical submodule pointers could point to commits that get garbage-collected away) so I always create and push a tag before the rebase, to make sure the old commits will never get purged. I believe this is safe, based on some experiments I’ve run.
>
> The issue: I set the config var push.recurseSubmodules=check, and
> it seems to insist on having a branch and not merely a tag.
I suspect that this is pretty much by design.
When deciding if it needs a push in a submodule repository,
submodule.c::submodule_needs_pushing() gets called and asked to
check what is available at the remote without actually making a
connection to the other side. It is done by looking at the
remote-tracking branches in the copy of the submodule repository we
have locally. As there is no "remote-tracking tags" (iow, you
cannot tell from the output of "git -C submodule tag -l" if each of
the tags you have locally in your copy of the submodule exists in
another repository you push to and fetch from), this process does
not look at refs/tags/ hierarchy of your copy of the submodule
repository and that is quite deliberate, I would think.
prev parent reply other threads:[~2019-06-12 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 2:04 push.recurseSubmodules=check doesn't consider tags Scott Johnson
2019-06-12 17:26 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqef3yk95i.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=scott.johnson@arilinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).