All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Paweł Dominiak" <dominiak.pawel@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] userdiff: skip textconv caching when not in a repository
Date: Mon, 26 Feb 2024 08:35:28 -0800	[thread overview]
Message-ID: <xmqqle77dvzj.fsf@gitster.g> (raw)
In-Reply-To: <20240226102729.GB2685773@coredump.intra.peff.net> (Jeff King's message of "Mon, 26 Feb 2024 05:27:29 -0500")

Jeff King <peff@peff.net> writes:

> Subject: userdiff: skip textconv caching when not in a repository
>
> The textconv caching system uses git-notes to store its cache entries.
> But if you're using "diff --no-index" outside of a repository, then
> obviously that isn't going to work.
>
> Since caching is just an optimization, it's OK for us to skip it.
> However, the current behavior is much worse: we call notes_cache_init()
> which tries to look up the ref, and the low-level ref code hits a BUG(),
> killing the program. Instead, we should notice before setting up the
> cache that it there's no repository, and just silently skip it.

Makes sense.

Will queue.  Thanks.

      reply	other threads:[~2024-02-26 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26  7:03 Bug: diff --no-index with cachetextconv crashes Paweł Dominiak
2024-02-26  7:22 ` Jeff King
2024-02-26  7:56   ` Paweł Dominiak
2024-02-26 10:27     ` [PATCH] userdiff: skip textconv caching when not in a repository Jeff King
2024-02-26 16:35       ` Junio C Hamano [this message]

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=xmqqle77dvzj.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=dominiak.pawel@gmail.com \
    --cc=git@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.