git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Derrick Stolee <stolee@gmail.com>,
	"git\@vger.kernel.org" <git@vger.kernel.org>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: Question about get_cached_commit_buffer()
Date: Wed, 21 Feb 2018 14:22:05 -0800	[thread overview]
Message-ID: <xmqqtvuax9te.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180221184811.GD4333@sigill.intra.peff.net> (Jeff King's message of "Wed, 21 Feb 2018 13:48:12 -0500")

Jeff King <peff@peff.net> writes:

> I think that repeating the oid is intentional; the point is to dump how
> the traversal code is hitting the endpoints, even if we do so multiple
> times.
>
> The --oneline behavior just looks like a bug. I think --format is broken
> with --show-all, too (it does not show anything!).

I do not know about the --format thing, but the part about --oneline
being a bug is correct.  I've known about the oneline that does not
show anything other than the oid (not even end-of-line) for unparsed
commits for a long time---I just didn't bother looking into fixing
it exactly because this is only a debugging aid ;-)

> Though I think it would be equally correct to have set_commit_buffer()
> just throw away the existing cache entry and replace it with this one. I
> don't think there's a real reason to prefer the old to the new. And that
> might be worth doing if it would let us drop get_cached_commit_buffer()
> as a public function. But...
> ...
> In my opinion it's not really worth trying to make it private. The
> confusion you're fixing in the first two calls is not due to a bad API,
> but due to some subtly confusing logic in that code's use of the API. ;)

Yup.

> So I'd probably do this:
> ...

Makes sense to me.

  parent reply	other threads:[~2018-02-21 22:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 22:12 Question about get_cached_commit_buffer() Derrick Stolee
2018-02-20 22:57 ` Jeff King
2018-02-21 14:13   ` Derrick Stolee
2018-02-21 18:48     ` Jeff King
2018-02-21 18:52       ` Jeff King
2018-02-21 19:17         ` [PATCH] commit: drop uses of get_cached_commit_buffer() Derrick Stolee
2018-02-21 19:19           ` Derrick Stolee
2018-02-21 23:34             ` Jeff King
2018-02-21 23:13           ` Jeff King
2018-02-21 23:22             ` Stefan Beller
2018-02-21 23:29               ` Jeff King
2018-02-22  1:52             ` Derrick Stolee
2018-02-21 22:22       ` Junio C Hamano [this message]
2018-02-21 22:50         ` Question about get_cached_commit_buffer() Jeff King
2018-02-21 23:03           ` Junio C Hamano
2018-02-21 23:27             ` [PATCH] revision: drop --show-all option Jeff King
2018-02-21 23:45               ` Linus Torvalds

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=xmqqtvuax9te.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=stolee@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).