git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: jonathantanmy@google.com, git@vger.kernel.org
Subject: Re: [PATCH] fetch: ensure submodule objects fetched
Date: Sun, 09 Dec 2018 10:57:44 +0900	[thread overview]
Message-ID: <xmqq1s6r5unb.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181206212655.145586-1-sbeller@google.com> (Stefan Beller's message of "Thu, 6 Dec 2018 13:26:55 -0800")

Stefan Beller <sbeller@google.com> writes:

> Currently when git-fetch is asked to recurse into submodules, it dispatches
> a plain "git-fetch -C <submodule-dir>" (with some submodule related options
> such as prefix and recusing strategy, but) without any information of the
> remote or the tip that should be fetched.
>
> But this default fetch is not sufficient, as a newly fetched commit in
> the superproject could point to a commit in the submodule that is not
> in the default refspec. This is common in workflows like Gerrit's.
> When fetching a Gerrit change under review (from refs/changes/??), the
> commits in that change likely point to submodule commits that have not
> been merged to a branch yet.
>
> Fetch a submodule object by id if the object that the superproject
> points to, cannot be found. For now this object is fetched from the
> 'origin' remote as we defer getting the default remote to a later patch.
>
> A list of new submodule commits are already generated in certain
> conditions (by check_for_new_submodule_commits()); this new feature
> invokes that function in more situations.
>
> The submodule checks were done only when a ref in the superproject
> changed, these checks were extended to also be performed when fetching
> into FETCH_HEAD for completeness, and add a test for that too.
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
>
> Thanks Jonathan for the review!
> So it looks like only the last patch needs some improvements,
> which is why I'd only resend the last patch here.
> Also note the test with interious superproject commits.

Sorry, can't parse the last sentence.

Anyway, will replace the last step with this.  Thanks.


  reply	other threads:[~2018-12-09  1:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29  0:27 [PATCHv2 0/9] Resending sb/submodule-recursive-fetch-gets-the-tip Stefan Beller
2018-11-29  0:27 ` [PATCH 1/9] sha1-array: provide oid_array_filter Stefan Beller
2018-11-29  0:27 ` [PATCH 2/9] submodule.c: fix indentation Stefan Beller
2018-11-29  0:27 ` [PATCH 3/9] submodule.c: sort changed_submodule_names before searching it Stefan Beller
2018-12-05  0:12   ` Jonathan Tan
2018-11-29  0:27 ` [PATCH 4/9] submodule.c: tighten scope of changed_submodule_names struct Stefan Beller
2018-11-29  0:27 ` [PATCH 5/9] submodule: store OIDs in changed_submodule_names Stefan Beller
2018-11-29  0:27 ` [PATCH 6/9] repository: repo_submodule_init to take a submodule struct Stefan Beller
2018-11-29  0:27 ` [PATCH 7/9] submodule: migrate get_next_submodule to use repository structs Stefan Beller
2018-12-05  0:17   ` Jonathan Tan
2019-02-02  1:58   ` Jonathan Nieder
2018-11-29  0:27 ` [PATCH 8/9] submodule.c: fetch in submodules git directory instead of in worktree Stefan Beller
2018-12-05  0:38   ` Jonathan Tan
2018-11-29  0:27 ` [PATCH 9/9] fetch: try fetching submodules if needed objects were not fetched Stefan Beller
2018-12-05  1:07   ` Jonathan Tan
2018-12-06 21:26     ` [PATCH] fetch: ensure submodule objects fetched Stefan Beller
2018-12-09  1:57       ` Junio C Hamano [this message]
2018-12-05  3:10 ` [PATCHv2 0/9] Resending sb/submodule-recursive-fetch-gets-the-tip Junio C Hamano
2018-12-06 21:59   ` Stefan Beller
2018-12-07  0:25 ` Josh Steadmon
2019-01-15  1:38   ` Jonathan Nieder

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=xmqq1s6r5unb.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=sbeller@google.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).