When two versions have identical content, changes() currently returns:
system | v1 -> v2
=======================================================
+ ADDED (0 lines)
- REMOVED (0 lines)
This is misleading, it looks like a result when there isn't one. The expected behaviour is a clear, explicit message.
Expected output:
No changes between v1 and v2.
Where to look
The logic lives in [graver/core.py] inside the changes() method. After the diff is computed, check whether both added and removed are empty and return early with the message.
A test should be added to tests/test_core.py covering the case where the same content is saved twice.
Scope
Only changes() in core.py and one new test case. No other files need to change.
When two versions have identical content, changes() currently returns:
This is misleading, it looks like a result when there isn't one. The expected behaviour is a clear, explicit message.
Expected output:
Where to look
The logic lives in
[graver/core.py]inside thechanges()method. After the diff is computed, check whether bothaddedandremovedare empty and return early with the message.A test should be added to
tests/test_core.pycovering the case where the same content is saved twice.Scope
Only
changes()incore.pyand one new test case. No other files need to change.