git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] Avoiding errors when partial cloning a tagged blob

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2018, 20:10 UTC
Message-ID
<xmqqk1q8jfak.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180706193847.160161-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 6 quoted lines
>> When cloning a repository with a tagged blob (like the Git repository)
>> with --filter=blob:none, the following message appears:
>> 
>>         error: missing object referenced by 'refs/tags/junio-gpg-pub'
>> 
>> and the resulting repository also fails fsck.
Hmph, the approach taken by these two patches smells bad.

When a blob is deliberately omitted with --fitler=blob:none, the fsck that encounters an entry in a tree object that is about that expected-to-be-and-actually-is-missing blob does *not* complain and that is by design, right? Naïvely, I may expect fsck to follow the same principle--when it encounters a reference to an object that is deliberately missing, refrain from complaining, regardless of the place the offending reference was found, be it inside a tree object or a ref.

Perhaps that line of consistent behaviour may be impossible due to the way the reference is stored inside a tree object and a ref? E.g. a reference to an expected-to-be-missing blob still lets us know that the missing object is expected to be a blob, but a ref only stores the object name and not its type, so we can tell it is missing, but we cannot say it is OK to be missing because we expect it to be a blob, or something?

Previous: Jonathan TanNext: Jonathan Tan
Message 5 of 12 in “Avoiding errors when partial cloning a tagged blob”
  1. 0/2 Avoiding errors when partial cloning a tagged blobJonathan Tan, Jul 6, 2018
  2. 1/2 upload-pack: send refs' objects despite "filter"Jonathan Tan, Jul 6, 2018
  3. 2/2 clone: check connectivity even if clone is partialJonathan Tan, Jul 6, 2018
  4. Jonathan TanJul 6, 2018
  5. Junio C HamanoJul 6, 2018
  6. Jonathan TanJul 6, 2018
  7. Jonathan NiederJul 6, 2018
  8. Junio C HamanoJul 6, 2018
  9. Junio C HamanoJul 9, 2018
  10. Jonathan TanJul 9, 2018
  11. Junio C HamanoJul 9, 2018
  12. Jonathan TanJul 9, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.