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

gitattributes: allow diff of test data #470

Merged
merged 2 commits into from
Mar 19, 2022
Merged

Conversation

adamjstewart
Copy link
Collaborator

This allows git diff to show changes to text files in tests/data.

Previously, we treated all test files as binary (equivalent to -text -diff). This resulted in useless diffs like:

$ git diff
diff --git a/tests/data/cowc_counting/data.py b/tests/data/cowc_counting/data.py
index b612f92..c5ef84a 100755
Binary files a/tests/data/cowc_counting/data.py and b/tests/data/cowc_counting/data.py differ

However, -text is sufficient to prevent line endings from being changed (necessary for stable cross-platform checksums). Now, all text files diff properly. I also added back line ending changes to data.py since we never need to checksum that.

@adamjstewart adamjstewart merged commit 29edfe8 into main Mar 19, 2022
@adamjstewart adamjstewart deleted the fixes/data.py-diff branch March 19, 2022 15:31
remtav pushed a commit to remtav/torchgeo that referenced this pull request May 26, 2022
* gitattributes: allow diff of data.py files

* Allow diffs of all text files, not just data.py
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
* gitattributes: allow diff of data.py files

* Allow diffs of all text files, not just data.py
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.

1 participant