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

Re: [PATCH] unpack_trees(): skip trees that are the same in all input

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 29, 2010, 19:15 UTC
Message-ID
<7vd3oktmoo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTinm=k_84Nh4YakbkdNNLO4-yeVxGF+p_rR5TFB=@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 15 quoted lines
> On Thu, Dec 23, 2010 at 5:13 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> @@ -447,6 +451,11 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
>>        struct traverse_info newinfo;
>>        struct name_entry *p;
>>
>> +       if (!df_conflicts) {
>> +               int status = fast_forward_merge(n, dirmask, names, info);
>> +               if (status)
>> +                       return status;
>> +       }
>
> Also skip the optimization when sparse checkout is active
> (info->data->skip_sparse_checkout == 0). People may need to just
> update skip-worktree bits and add/remove worktree files along the
> line.
Sounds sensible and safer to special case that one, I would agree.

By the way, I think info->data->skip_sparse_checkout should be fixed by renaming it to info->data->sparse_checkout. The flag controls a special case logic that should not be in effect unless explicitly asked, and forcing normal codepath to say "If skip_sparse_checkout is not false, do this" in double-negative is unnice than "If sparse_checkout is in effect, please run this special case" when reading the code.

Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 3 of 4 in “unpack_trees(): skip trees that are the same in all input”
  1. unpack_trees(): skip trees that are the same in all inputJunio C Hamano, Dec 22, 2010
  2. Nguyen Thai Ngoc DuyDec 29, 2010
  3. Junio C HamanoDec 29, 2010
  4. Nguyen Thai Ngoc DuyDec 30, 2010

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.