Skip to content

Commit

Permalink
Activate the binary detection by default
Browse files Browse the repository at this point in the history
As binary detection was turned off, all binary files were given to the
line-ending filter and ended up altered, showing as modified in status for
example.
  • Loading branch information
Boris Feld committed Jan 17, 2019
1 parent 9c0ae13 commit 19cc89b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dulwich/line_ending.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def checkin_normalize(self, blob, tree_path):
"""
if self.fallback_write_filter is not None:
return normalize_blob(
blob, self.fallback_write_filter, binary_detection=False
blob, self.fallback_write_filter, binary_detection=True
)

return blob
Expand All @@ -244,7 +244,7 @@ def checkout_normalize(self, blob, tree_path):
"""
if self.fallback_read_filter is not None:
return normalize_blob(
blob, self.fallback_read_filter, binary_detection=False
blob, self.fallback_read_filter, binary_detection=True
)

return blob
Expand Down
4 changes: 3 additions & 1 deletion dulwich/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,9 @@ def get_blob_normalizer(self):
"""
# TODO Parse the git attributes files
git_attributes = {}
return BlobNormalizer(self.get_config_stack(), git_attributes)
return BlobNormalizer(
self.get_config_stack(), git_attributes
)


class MemoryRepo(BaseRepo):
Expand Down

0 comments on commit 19cc89b

Please sign in to comment.