From: Christian Couder <chriscool@tuxfamily.org>
To: gitster@pobox.com
Cc: peff@peff.net, git@vger.kernel.org, joey@kitenet.net
Subject: Re: [PATCH 0/5] teach replace objects to sha1_object_info_extended()
Date: Tue, 03 Dec 2013 21:42:09 +0100 (CET) [thread overview]
Message-ID: <20131203.214209.1698497614731424957.chriscool@tuxfamily.org> (raw)
In-Reply-To: <xmqqtxeqq0qs.fsf@gitster.dls.corp.google.com>
From: Junio C Hamano <gitster@pobox.com>
>
> Jeff King <peff@peff.net> writes:
>
>> On Mon, Dec 02, 2013 at 09:52:25AM -0500, Jeff King wrote:
>>
>>> I find it a little funny that we reuse the READ_SHA1_FILE_REPLACE flag
>>> directly in lookup_replace_object. That means that it is now a
>>> meaningful flag for sha1_object_info_extended, even though the name does
>>> not say so. It also means that the two may have to coordinate further
>>> flags (since a portion of their flag namespace is shared by
>>> lookup_replace_object). I don't foresee adding a lot of new flags,
>>> though, so it probably isn't a huge deal.
>>>
>>> I also would have expected sha1_object_info_extended to simply receive
>>> the new flag via the struct object_info. Again, probably not a big deal,
>>> because there aren't many callsites that needed updating. But if we were
>>> not sharing flags with read_sha1_file, I think doing it as a flag in the
>>> struct would be nicer.
>>
>> Curious what this would look like, I wrote the patch. If you drop your
>> patches 2 and 3, then your final patch (actually fixing the problem)
>> would look like the one below:
>>
>> We may be getting into bikeshed territory, and I don't feel
>> super-strongly about it, so I won't say anything more. Now we've seen
>> both alternatives, and you or Junio can pick. :)
Thanks for doing that.
I still prefer a flag used by sha1_object_info_extended(),
read_sha1_file_extended() and lookup_replace_object_extended().
I think it is more coherent this way.
> FWIW, I shared that "a little funny" feeling ;-)
Yeah, it's true that I should have renamed the flag.
READ_SHA1_FILE_REPLACE is too much related to the read_sha1_file*()
functions.
As it is related to lookup_replace_object*() functions, what
about LOOKUP_REPLACE_OBJECT?
Thanks,
Christian.
next prev parent reply other threads:[~2013-12-03 20:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 13:51 [PATCH 0/5] teach replace objects to sha1_object_info_extended() Christian Couder
2013-11-30 13:51 ` [PATCH 1/5] replace_object: don't check read_replace_refs twice Christian Couder
2013-11-30 13:51 ` [PATCH 2/5] introduce lookup_replace_object_extended() to pass flags Christian Couder
2013-11-30 13:51 ` [PATCH 3/5] Add an "unsigned flags" parameter to sha1_object_info_extended() Christian Couder
2013-11-30 13:51 ` [PATCH 4/5] t6050: show that git cat-file --batch fails with replace objects Christian Couder
2013-11-30 13:51 ` [PATCH 5/5] sha1_file: perform object replacement in sha1_object_info_extended() Christian Couder
2013-12-02 14:52 ` [PATCH 0/5] teach replace objects to sha1_object_info_extended() Jeff King
2013-12-02 15:06 ` Jeff King
2013-12-02 23:41 ` Junio C Hamano
2013-12-03 20:42 ` Christian Couder [this message]
2013-12-03 20:46 ` Christian Couder
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=20131203.214209.1698497614731424957.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=joey@kitenet.net \
--cc=peff@peff.net \
/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).