git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: gitster@pobox.com
Cc: jonathantanmy@google.com, git@vger.kernel.org
Subject: Re: [PATCH] diff: skip GITLINK when lazy fetching missing objs
Date: Tue, 20 Aug 2019 14:39:24 -0700	[thread overview]
Message-ID: <20190820213924.154253-1-jonathantanmy@google.com> (raw)
In-Reply-To: <xmqqblwjtu1b.fsf@gitster-ct.c.googlers.com>

> Jonathan Tan <jonathantanmy@google.com> writes:
> 
> > In 7fbbcb21b1 ("diff: batch fetching of missing blobs", 2019-04-08),
> > diff was taught to batch the fetching of missing objects when operating
> > on a partial clone, but was not taught to refrain from fetching
> > GITLINKs. Teach diff to check if an object is a GITLINK before including
> > it in the set to be fetched.
> 
> OK, so in a lazy repository, running "git diff" (or "git log") could
> have resulted in "git fetch" of a history of a submodule, which may
> likely have failed?

Yes - it would attempt to fetch the submodule commit (as stated in the
GITLINK) from the superproject, which is very unlikely to succeed. (And
succeeding would allow the operation to continue, but will cause the
superproject to have unrelated objects in its object store, which is not
what we want anyway.)

> Sign-off?

Oops...here you go.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>

> Makes sense.
> 
> Thanks.

Thanks for looking at this.

  reply	other threads:[~2019-08-20 21:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 20:53 [PATCH] diff: skip GITLINK when lazy fetching missing objs Jonathan Tan
2019-08-20 21:18 ` Junio C Hamano
2019-08-20 21:39   ` Jonathan Tan [this message]
2019-08-22  4:15     ` Jeff King
2019-08-22 16:25       ` Jonathan Tan
2019-08-22 17:10         ` Jeff King

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=20190820213924.154253-1-jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).