4 ms·
> This has resulted in a contender for the world's smallest open source patch: Hah, got you beat: https://github.com/eki3z/mise.el/pull/12/files https://github
by autarch 2y ago
> This has resulted in a contender for the world's smallest open source patch:
Hah, got you beat: https://github.com/eki3z/mise.el/pull/12/files https://github.com/eki3z/mise.el/pull/12/files
It's one ASCII character, so a one-byte patch. I don't think you can get smaller than that.
- ZeWaka 2y agoThat's a line modification, so presumably you'd count just an insertion or just a deletion as 'smaller'.
- autarch 2y agoYes, but so is the PR shown in the article. You're not going to get a diff that's less than one line unless you are using something besides the typical diff and patch tools.
- san1t1 2y agoMy smallest PR was adding a missing executable file permission.
- Izkata 2y agoIn terms of file contents, I have a bugfix commit somewhere that just adds a single newline to a config file (no line deleted in the diff). We were using something that had its own own custom parser for what looked like an INI file, and we managed to find an edge case where the wrong number of blank lines would break it.
- timdorr 2y agoSure you can: https://github.com/timdorr/-/commit/9e5a571abd3fc4f8714e8c401076e10338e0bdce https://github.com/timdorr/-/commit/9e5a571abd3fc4f8714e8c40...
- retroflexzy 2y agoThere is a cursor rendering fix in xf86-video-radeonhd (or perhaps -radeon) that flips a single bit. It took the group several years to narrow in on.
- deleted 2y ago[deleted]
- immibis 2y agoThe Dolphin patch that fixed the heat haze in Dragon Roost Island was also a single bit, changing a 3 to a 7 in source code, and also took several years. https://dolphin-emu.org/blog/2014/01/06/old-problem-meets-its-timely-demise/ https://dolphin-emu.org/blog/2014/01/06/old-problem-meets-it... This comment has been delayed by about 12 hours due to the Hacker News rate limit.
- wavemode 2y agoA commit which does nothing more than change permissions of a file would probably beat that, from an information theory perspective. You might say, "nay! the octal triple of a file's unix permissions requires 3+3+3 bits, which is 9, which is greater than the 8 bits of a single ascii character!" But, actually, Git does not support any file permissions other than 644 and 755. So a change from one to the other could theoretically be represented in just one bit of information.
- ithkuil 2y agoOk. But you need to specify the name of the file. So it also needs to be a one character filename. I wonder if file deletion is theoretically even smaller than permission change.
- arghwhat 2y ago> So it also needs to be a one character filename. No one counts the path being changed, just like they also don't count the commit message, committer and author name/email, etc.
- chungy 2y ago> But, actually, Git does not support any file permissions other than 644 and 755. So a change from one to the other could theoretically be represented in just one bit of information. Git also supports mode 120000 (symbolic links), so you could add another bit of information there.
- masklinn 2y ago> Git does not support any file permissions other than 644 and 755. It does not but kinda does, git stores the entire unix mode in the tree object (in ascii encoded octal to boot), it has a legacy 775 mode (which gets signaled by fsck —strict, maybe, if that’s been fixed), and it will internally canonicalise all sorts of absolute nonsense.
- schacon 2y agoDamn you! I did find it a little funny that my patch was so small but my commit message was so long. Also, I haven't successfully landed it yet, I keep being too lazy to roll more versions.
- pR0Ps 2y agoSame: https://github.com/ianare/exif-py/pull/75/files https://github.com/ianare/exif-py/pull/75/files I feel like a bit of a fraud because this was the PR that got me the "Mars 2020 Contributor" badge...