diff options
author | Jeff King <peff@peff.net> | 2024-02-26 05:27:29 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-26 09:40:55 -0800 |
commit | affe355fe706d79ce6959277c39a7f1b1ec35f58 (patch) | |
tree | 6aeacb4da9b5db0b66591de6349b8112907e11f0 /commit.h | |
parent | 0d464a4e6a5a19bd8fbea1deae22d48d14dccb01 (diff) |
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.
Reported-by: Paweł Dominiak <dominiak.pawel@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions