Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iter_annexworktree fails on Windows 10 with git-annex #559

Closed
christian-monch opened this issue Dec 7, 2023 · 1 comment
Closed

iter_annexworktree fails on Windows 10 with git-annex #559

christian-monch opened this issue Dec 7, 2023 · 1 comment
Assignees

Comments

@christian-monch
Copy link
Contributor

On a Windows installation (Windows 10Pro, 22H2) with git-annex version: 10.20230803-gd467c70ef7, the tests of iter_annexworktree fail.

The reason is that a key in the format '${key}\r\n' is written out by git-annex find, even though the format '${key}\n' is specified (the output contains an additional '\r').

The itemize-function that parses the output of git-annex find expects a single b'\n' as key-terminator, and fails therefore to properly yield individual keys.

This can be fixed by setting the terminator to None which allows itemize to use a number of different separators, e.g. b'\r' and b'\r\n'.

@christian-monch christian-monch self-assigned this Dec 7, 2023
christian-monch added a commit to christian-monch/datalad-next that referenced this issue Dec 7, 2023
This commit fixes issue datalad#559. It allows `itemize`
to any of multiple line-separators to separate the
output of `git annex find`. This takes care of the
fact that some git-annex versions will output
an unrequested `'\r'` in addition to a requested
`'\n'`.
mih added a commit that referenced this issue Dec 7, 2023
fix issue #559, a Windows line endings-related bug
@mih
Copy link
Member

mih commented Dec 8, 2023

Fix with #560

@mih mih closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants