git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug: diff --no-index with cachetextconv crashes
@ 2024-02-26  7:03 Paweł Dominiak
  2024-02-26  7:22 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Paweł Dominiak @ 2024-02-26  7:03 UTC (permalink / raw)
  To: git

Hey!

That's my first bug report for git and my first email to a mailing
list in general, I hope for understanding :)

[Steps to reproduce your issue]

Global .gitattributes:

*.txt diff=test

Global .gitconfig:

[diff "test"]
    textconv = cat
    cachetextconv = true

Called command:

git --no-pager diff --no-index foo.txt bar.txt

[Expected behavior]

diff --git a/foo.txt b/bar.txt
index f6a4b70..2b24d27 100644
--- a/foo.txt
+++ b/bar.txt
@@ -1 +1 @@
-Foo bar baz
+Foo bar qux

[Actual behavior]

BUG: refs.c:2095: attempting to get main_ref_store outside of repository

The command works as expected if cachetextconv is disabled:

git --no-pager -c diff.test.cachetextconv=false diff --no-index foo.txt bar.txt

[System Info]
git version 2.44.0.windows.1
cpu: x86_64
built from commit: ad0bbfffa543db6979717be96df630d3e5741331
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Windows 10.0 19045
compiler info: gnuc: 13.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe

[Enabled Hooks]
not run from a git repository - no hooks to show

Pawel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-26 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).