Re: push.recurseSubmodules=check doesn't consider tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott Johnson <scott.johnson@xxxxxxxxxxx> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux