this post was submitted on 24 Jan 2024
42 points (86.2% liked)

Programming Horror

239 readers
3 users here now

Welcome to Programming Horror!

This is a place to share strange or terrible code you come across.

For more general memes about programming there's also Programmer Humor.

Looking for mods. If youre interested in moderating the community feel free to dm @[email protected]

Rules

Credits

founded 1 year ago
MODERATORS
 

I was looking through various RCON tools and found this. Someone does not like commit messages.

top 25 comments
sorted by: hot top controversial new old
[–] [email protected] 12 points 10 months ago (2 children)

At least it's better than me messing up with the commit date :v https://github.com/DrSensor/rescript.nix/commits/trunk/

[–] inspxtr 3 points 10 months ago (1 children)
[–] [email protected] 8 points 10 months ago

Don't commit near a black hole, apparently

[–] [email protected] 2 points 6 months ago* (last edited 6 months ago)

what in the

very odd behaviour to say the least
that's their personal project or I hope anyways

[–] [email protected] 8 points 10 months ago (1 children)

I think that there's one important point to consider that may not be immediately obvious, when deciding about commit messages in FOSS project, even if you are not accepting contributions and just want to share your work for others - auditabilty.

7-zip has been receiving critique for this for a long time - not having commit messages makes it way harder to check what the actual changes were. Sure you can't trust commit messages during an audit, but it makes it a lot easier - either you immediately notice that they are lying, or they are correct and will help you with understanding the change, so you can decide for yourself whether it's safe.

Of course, the author is doing a lot of work for free, that he offers to others, so we have no right to blame him for it or demand he changes his approach. I'm grateful for any FOSS project, and demanding from someone directly that he's doing it wrong and should do it some other way (or belittling him for it) isn't OK. However, I'd probably be very careful when encountering a repository like this, and reconsider whether it's worth adopting. Which is absolutely ok and I don't blame the author for it in the slightest - it's his repo and his work - but I also think that auditability may be something the author didn't realize, and assuming his goal was to share his code with others i.e to build a portfolio, may affect his overall adoption rate. But it's also ok if he simply doesn't care about that.

But in general, if you're making a FOSS project, I'd recommend sticking with good commit messages.

[–] [email protected] 3 points 10 months ago

Commit messages are as much for me as other people tbh. As long as your commits aren't massive I don't really think it's much work either for the benefits.

But like you say we have no right to demand anything from people giving up their free time for us. We can just choose not to use it.

[–] [email protected] 3 points 10 months ago (1 children)
[–] [email protected] 2 points 10 months ago

This is unnecessary. There is a tool that makes the commit hashes themselves numeric and monotonicity increasing.