git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] unpack_trees(): skip trees that are the same in all input
Date: Wed, 29 Dec 2010 11:15:51 -0800	[thread overview]
Message-ID: <7vd3oktmoo.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <AANLkTinm=k_84Nh4YakbkdNNLO4-yeVxGF+p_rR5TFB=@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Wed\, 29 Dec 2010 21\:43\:09 +0700")

Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:

> 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.

  reply	other threads:[~2010-12-29 19:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 22:13 [PATCH] unpack_trees(): skip trees that are the same in all input Junio C Hamano
2010-12-29 14:43 ` Nguyen Thai Ngoc Duy
2010-12-29 19:15   ` Junio C Hamano [this message]
2010-12-30 12:44     ` Nguyen Thai Ngoc Duy

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vd3oktmoo.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /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.
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 NNTP newsgroup(s).