Bug: diff --no-index with cachetextconv crashes
- From
- Paweł Dominiak <dominiak.pawel@gmail.com>
- Date
- Feb 26, 2024, 07:03 UTC
- Message-ID
- <CACeVQwQ4MELjB8nZyeu9QDTtgwhhw0oOsL8BHdm_rxTj1vMy+A@mail.gmail.com>
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 = trueCalled 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