News for hackers. Stuff that matters.
Re:Going down the rabbit hole of Git's new bundle-URI by autarch on Sunday March 16, 2025 @06:57PM (#43383378)
> 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

It's one ASCII character, so a one-byte patch. I don't think you can get smaller than that.

Re:Going down the rabbit hole of Git's new bundle-URI by yangman on Sunday March 16, 2025 @07:24PM (#43383580)
There 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.

Re:Going down the rabbit hole of Git's new bundle-URI by immibis on Monday March 17, 2025 @12:29PM (#43390207)
The 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-it...

This comment has been delayed by about 12 hours due to the Hacker News rate limit.

Re:Going down the rabbit hole of Git's new bundle-URI by timdorr on Sunday March 16, 2025 @07:23PM (#43383566)
Re:Going down the rabbit hole of Git's new bundle-URI by falcor84 on Sunday March 16, 2025 @07:28PM (#43383605)
What's the story behind that? Did you just deploy a blank commit to trigger a hook?
Re:Going down the rabbit hole of Git's new bundle-URI by nine_k on Sunday March 16, 2025 @07:30PM (#43383619)
Only accepted and merged commits count!
Re:Going down the rabbit hole of Git's new bundle-URI by ZeWaka on Sunday March 16, 2025 @07:00PM (#43383400)
That's a line modification, so presumably you'd count just an insertion or just a deletion as 'smaller'.
Re:Going down the rabbit hole of Git's new bundle-URI by autarch on Sunday March 16, 2025 @07:11PM (#43383483)
Yes, 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.
Re:Going down the rabbit hole of Git's new bundle-URI by san1t1 on Sunday March 16, 2025 @07:16PM (#43383517)
My smallest PR was adding a missing executable file permission.
Re:Going down the rabbit hole of Git's new bundle-URI by autarch on Sunday March 16, 2025 @07:22PM (#43383554)
I think that wins, since presumably it was smaller than a one-byte change. I guess the smallest would be a single-bit file mode change, maybe?
Re:Going down the rabbit hole of Git's new bundle-URI by dullcrisp on Sunday March 16, 2025 @11:23PM (#43384888)
Only the user permission? Or group and others also?
Re:Going down the rabbit hole of Git's new bundle-URI by Izkata on Monday March 17, 2025 @12:57AM (#43385339)
In 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.
Re:Going down the rabbit hole of Git's new bundle-URI by wavemode on Monday March 17, 2025 @01:25AM (#43385424)
A 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.

Re:Going down the rabbit hole of Git's new bundle-URI by ithkuil on Monday March 17, 2025 @03:39AM (#43386048)
Ok. 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.

Re:Going down the rabbit hole of Git's new bundle-URI by arghwhat on Monday March 17, 2025 @04:17AM (#43386215)
> 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.

Re:Going down the rabbit hole of Git's new bundle-URI by chungy on Monday March 17, 2025 @06:24AM (#43386865)
> 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.

Re:Going down the rabbit hole of Git's new bundle-URI by masklinn on Monday March 17, 2025 @07:01AM (#43387148)
> 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.

Re:Going down the rabbit hole of Git's new bundle-URI by schacon on Monday March 17, 2025 @02:57AM (#43385824)
Damn 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.

Re:Going down the rabbit hole of Git's new bundle-URI by pR0Ps on Thursday March 20, 2025 @11:53AM (#43424937)
Same: 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...