git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varun Naik <vcnaik94@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <l.s.r@web.de>,
	git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [RFC PATCH] unpack-trees.c: handle empty deleted ita files
Date: Thu, 15 Aug 2019 09:17:09 -0700	[thread overview]
Message-ID: <CAK_rgsGSfL2zQLP59O+PUCLGz0X8c4UQ3Zg=9M+nCww5C+X_gA@mail.gmail.com> (raw)
In-Reply-To: <xmqqr25o7qmf.fsf@gitster-ct.c.googlers.com>

On Tue, Aug 13, 2019 at 1:33 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> The original code considered that two entries with the same mode and
> the same "contents" are the same.  As nobody sane tracks an empty
> file for an extended span of history, that meant that most of the
> time, intent-to-add entries, which has the normal mode bits for the
> blobs (with or without the executable bit) and object name for a
> zero length blob, would have been judged "different".
>

I agree, this edge case is really arcane. The rabbit hole was deep :)

> So perhaps
>
> +       !ce_intent_to_add(a) && !ce_intent_to_add(b) &&
>
> i.e. "a cache entry is eligible to be same with something else only
> when its I-T-A bit is unset".
>

I decided to follow René's suggestion in response to this. Patch coming soon.

Varun

  parent reply	other threads:[~2019-08-15 16:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 16:03 [RFC PATCH] unpack-trees.c: handle empty deleted ita files Varun Naik
2019-08-13 18:08 ` René Scharfe
2019-08-13 20:32   ` Junio C Hamano
2019-08-14  4:30     ` René Scharfe
2019-08-15 16:17     ` Varun Naik [this message]
2019-08-15 16:34       ` Junio C Hamano
2019-08-19 15:35         ` Varun Naik
2019-08-19 19:54           ` Junio C Hamano
2019-08-15 16:21 ` [PATCH v2] unpack-trees.c: distinguish ita files from empty files Varun Naik
2019-08-15 16:46   ` René Scharfe
2019-08-21  3:21 ` [PATCH v3] " Varun Naik
2020-02-14 17:14   ` [PATCH v4] " Varun Naik

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='CAK_rgsGSfL2zQLP59O+PUCLGz0X8c4UQ3Zg=9M+nCww5C+X_gA@mail.gmail.com' \
    --to=vcnaik94@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=pclouds@gmail.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.
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).