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

Re: [PATCH] unpack-trees: allow missing CE_SKIP_WORKTREE objs

From
Ben Peart <peartben@gmail.com>
Date
Oct 9, 2018, 14:49 UTC
Message-ID
<56cc6e57-d1e3-1182-4290-c8b6fa796534@gmail.com>
In-Reply-To
<xmqqpnwjpivb.fsf@gitster-ct.c.googlers.com>
On 10/9/2018 5:30 AM, Junio C Hamano wrote:
Show 17 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes:
> 
>> @@ -1635,6 +1635,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
>>   				o->result.cache_tree = cache_tree();
>>   			if (!cache_tree_fully_valid(o->result.cache_tree))
>>   				cache_tree_update(&o->result,
>> +						  WRITE_TREE_SKIP_WORKTREE_MISSING_OK |
>>   						  WRITE_TREE_SILENT |
>>   						  WRITE_TREE_REPAIR);
>>   		}
> 
> Hmmmm.  Should this be passing the bit unconditionally?  Shouldn't
> it be set only when we are doing lazy clone?  A non-lazy clone that
> merely uses sparse checkout has nowhere else to turn to if it loses
> a blob object that currently is not necessary to complete a checkout,
> unlike a repository with promisor.
> 

I agree. I believe this logic should only be triggered when running in a partial clone repo. Otherwise, we're potentially changing the behavior of 'normal' repos unnecessarily.

Previous: Junio C HamanoNext: Ben Peart
Message 4 of 7 in “unpack-trees: allow missing CE_SKIP_WORKTREE objs”
  1. unpack-trees: allow missing CE_SKIP_WORKTREE objsJonathan Tan, Oct 8, 2018
  2. Junio C HamanoOct 9, 2018
  3. Junio C HamanoOct 9, 2018
  4. Ben PeartOct 9, 2018
  5. Ben PeartOct 9, 2018
  6. cache-tree: skip some blob checks in partial cloneJonathan Tan, Oct 9, 2018
  7. Junio C HamanoOct 10, 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.