git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Varun Naik <vcnaik94@gmail.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: Mon, 19 Aug 2019 12:54:34 -0700	[thread overview]
Message-ID: <xmqq5zmtx75x.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAK_rgsHKaLkO_wputOKcHBTDTnyvOUNTABUKK3fKc3ddiaNzQQ@mail.gmail.com> (Varun Naik's message of "Mon, 19 Aug 2019 08:35:58 -0700")

Varun Naik <vcnaik94@gmail.com> writes:

>> Either is fine as the implementation of the same semantics; I
>> however am not sure if two I-T-A entries should compare "same" or
>> "not same", or if we are better off catching the caller that feeds
>> two I-T-A entries to same() with a BUG().
>
> I'd argue that two ita cache entries should be a BUG. Since we believe
> that a cache entry in the tree can never have the intent-to-add bit set,
> it suffices to show that no call to same() ever passes two cache entries
> from the index.
> ...
> The same argument probably extends to the conflicted bit, but changing
> that is probably out of scope of this patch.

Yup.  I think the patch as-posted is fine.  I also agree that
tightening the validity check of parameters to same() is better done
as a separate topic.

  reply	other threads:[~2019-08-19 19:54 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
2019-08-15 16:34       ` Junio C Hamano
2019-08-19 15:35         ` Varun Naik
2019-08-19 19:54           ` Junio C Hamano [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqq5zmtx75x.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=pclouds@gmail.com \
    --cc=vcnaik94@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).