logoalt Hacker News

vidimitrovyesterday at 7:28 PM2 repliesview on HN

The problem is that usually we don't write the WHY in the commits... We tend to always capture the WHAT in the form of prose. And for agents, this is just more noise, since all they need is just the diff to reconstruct the WHAT.

I've never seen someone write decisions or the intent they started with in commit messages. Even the solutions today that auto-generate commit messages just summarise the diff.

This was helpful when humans were the only ones reading the history. But for agents its useless.


Replies

0x457yesterday at 7:56 PM

Because commit history is here to explain WHAT and not WHY. "Why" is explained by a decision log such as ADR which can be store in the same repo and can be mutated in the same commit that has WHAT in its commit body.

But also, if you look at large projects like Linux or FreeBSD, commits there explain why as well.

show 1 reply
skydhashyesterday at 7:47 PM

> I've never seen someone write decisions or the intent they started with in commit messages

You may not have seen enough good repos. The following is an example commit from freebsd

https://cgit.freebsd.org/src/commit/?id=ac5ff2813027c385f903...

A proper email is like an email. You have the first line as the subject and it may be enough to explain the intent of the diff. But sometimes it’s not enough and you add more details in the body. I strongly believe that people who write the WHAT again don’t know that there’s a diff attached to the commit and think of them a separatete objects. GitHub and VSCode do not really help in that regard.

show 3 replies