-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
When diff.mnemonicPrefix is enabled, dunk fails with errors like this:
❯ git config --global diff.mnemonicPrefix
true
❯ git diff | dunk
Traceback (most recent call last):
File "/home/alex/.local/bin/dunk", line 10, in <module>
sys.exit(main())
^^^^^^
File "/home/alex/.local/share/uv/tools/dunk/lib/python3.12/site-packages/dunk/dunk.py", line 83, in main
_run_dunk()
File "/home/alex/.local/share/uv/tools/dunk/lib/python3.12/site-packages/dunk/dunk.py", line 132, in _run_dunk
target_code = target_file.read_text()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alex/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/pathlib.py", line 1027, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alex/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/pathlib.py", line 1013, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/Alex/WIP/Dunk/i/xyz/…'Filename redacted, but basically it does not recognise the other prefixes than a/ and b/ in the git diff output:
diff --git i/.vim/spell/alex.utf-8.add w/.vim/spell/alex.utf-8.add
index 494d43d..55b615e 100644
--- i/xyz/…/file
+++ w/xyz/…/file
danwald and kseistrup
Metadata
Metadata
Assignees
Labels
No labels