Open wpyoga opened 1 year ago
Isn't it the default? It seems so according to https://stackoverflow.com/a/18948381 I can also not see a difference after placing this file
Hmm... I've retested on my system:
$ git --version
git version 2.41.0
This is a git diff
example without the .gitattributes
entry:
$ git diff
diff --git a/umodbus/serial.py b/umodbus/serial.py
index 04e9c56..a78b29e 100644
--- a/umodbus/serial.py
+++ b/umodbus/serial.py
@@ -320,6 +320,8 @@ class Serial(CommonModbusFunctions):
:returns: Modbus response content
:rtype: bytes
"""
+ print("Response: {}".format(response.hex()))
+
if len(response) == 0:
raise OSError('no data received from slave')
This is the same command, with the .gitattributes
entry:
$ git diff
diff --git a/umodbus/serial.py b/umodbus/serial.py
index 04e9c56..a78b29e 100644
--- a/umodbus/serial.py
+++ b/umodbus/serial.py
@@ -320,6 +320,8 @@ def _validate_resp_hdr(self,
:returns: Modbus response content
:rtype: bytes
"""
+ print("Response: {}".format(response.hex()))
+
if len(response) == 0:
raise OSError('no data received from slave')
How does it look like on your system? Do you have a ~/.gitconfig
, ~/.config/git/config
, or /etc/gitconfig
file? I don't have any of those on my system.
Either way, this PR is not very important -- it only concerns git diff
output.
Use
.gitattributes
file:So that
git diff
shows the Python function name:Instead of just the class name: