Skip to content

File name parsing fails for file names with spaces #23

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

Closed
bluekeyes opened this issue Apr 22, 2021 · 0 comments · Fixed by #24
Closed

File name parsing fails for file names with spaces #23

bluekeyes opened this issue Apr 22, 2021 · 0 comments · Fixed by #24
Labels
bug Something isn't working parsing Issues related to parsing patches

Comments

@bluekeyes
Copy link
Owner

bluekeyes commented Apr 22, 2021

I recently encountered a patch containing this file deletion (paths sanitized):

diff --git a/path/to/file/File with Spaces.pdf b/path/to/file/File with Spaces.pdf
deleted file mode 100644
index 6e02dcd4fabc172009aca3a6f78763246c59b8fe..0000000000000000000000000000000000000000

I think I assumed these would be quoted, but Git does not seem to consider spaces special characters when generating patches. This leads to a git file header: missing filename information error.

Check behavior against git_header_name in apply.c to see how Git handles this.

@bluekeyes bluekeyes added bug Something isn't working parsing Issues related to parsing patches labels Apr 22, 2021
@bluekeyes bluekeyes changed the title Fix file name parsing for file names with spaces File name parsing fails for file names with spaces Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parsing Issues related to parsing patches
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant