[Git][reproducible-builds/diffoscope][master] Remove misleading comment.

Chris Lamb (@lamby) gitlab at salsa.debian.org
Mon Apr 20 17:55:31 UTC 2026



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
15512eef by Manuel Jacob at 2026-04-20T17:43:11+00:00
Remove misleading comment.

I saw the message “Too much input for diff” in the output. Searching for that in the source code lead me to this config parameter. In that context, reading the comment made me think that GNU diffutils has some hard limit. Manual testing showed that `diff` can cope with much larger files. I thought that maybe there used to be some hard limit. I couldn’t find anything like that when skimming GNU diffutils changes.

When diffing two files with few differences, I found the memory usage to be about the sum of the size of the input files. When constructing inputs that caused more than 2GiB of memory usage, the command didn’t finish after 1 h. Surely, there are cases where GNU diffutils could use less RAM or handle large files better, but fundamentally it is an issue of limited hardware resources.

In conclusion, I think that the comment is more misleading than insightful. I couldn’t think of a better one that states more than the obvious (“resources are limited”), so I decided to remove it.

- - - - -


1 changed file:

- diffoscope/config.py


Changes:

=====================================
diffoscope/config.py
=====================================
@@ -41,7 +41,6 @@ class Config:
     def reset(self):
         self.diff_context = 7
 
-        # GNU diff cannot process arbitrary large files :(
         self.max_diff_input_lines = 2**22
         self.max_diff_block_lines_saved = float("inf")
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/15512eefe2e3d2a0269591bff095b8a387ae4fc8

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/15512eefe2e3d2a0269591bff095b8a387ae4fc8
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20260420/e638faf4/attachment.htm>


More information about the rb-commits mailing list