这是indexloc提供的服务,不要输入任何密码
Skip to content

Remove windows line-ending conversions #63

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

Merged
merged 2 commits into from
Aug 26, 2022
Merged

Remove windows line-ending conversions #63

merged 2 commits into from
Aug 26, 2022

Conversation

dglsparsons
Copy link
Collaborator

@dglsparsons dglsparsons commented Aug 26, 2022

This was originally implemented to prevent spurious diffs when
swapping the same repository between windows and unix systems.

However, due to the lack of detection of binary files, such as png
images, this can cause some files to be corrupted.

Looking at the file command behaviour
it seems like detecting binary/non-binary files is extremely
non-trivial, and heuristic at best (meaning it could be wrong).

In order to prevent hard to detect/analyse issues, I think it's best to
just accept that some spurious changes can occur if swapping between
systems.

This relates to #50 and #53

Closes #61

This was originally implemented to prevent spurious diffs when
swapping the same repository between windows and unix systems.

However, due to the lack of detection of binary files, such as png
images, this can cause some files to be corrupted.

Looking at the [file command
behaviour](https://github.com/file/file/blob/f2a6e7cb7db9b5fd86100403df6b2f830c7f22ba/src/encoding.c#L151-L228)
it seems like detecting binary/non-binary files is extremely
non-trivial, and heuristic at best (meaning it could be wrong).

In order to prevent hard to detect/analyse issues, I think it's best to
just accept that some spurious changes can occur if swapping between
systems.
@dglsparsons dglsparsons requested a review from a team August 26, 2022 08:21
kakadiadarpan
kakadiadarpan previously approved these changes Aug 26, 2022
@dglsparsons dglsparsons merged commit f4ffc2a into main Aug 26, 2022
@dglsparsons dglsparsons deleted the fix-png-issue branch August 26, 2022 11:16
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

Successfully merging this pull request may close these issues.

PNG images in the public folder become corrupt when uploaded via provider
3 participants