Live data from Hacker News

Show HN: Generate commit messages using GPT-3

github.com

61–70 of 73 posts

Re: Show HN: Generate commit messages using GPT-3

#61

This creates precisely the kind of commit messages that I regularly scold junior developers for :)" In my opinion, commit messages should clarify the intent of WHY you changed things. I can already see WHAT you changed from the diffs. But of course, any tool can only work with the what, they cannot know that these lines are related to a bug report filed in a technically unrelated system.

I disagree. I want the what. The change itself explains the how. If the why isn't obvious and there's no link to a tracking system that explains it, it's fine if it's in the message body. I do want the why in comments, though.

I would go for the combination: first what, then why.

Links break, so a link to why is not good enough when it comes to long-lived code. A good commit message should however start by completing the sentence "when committed this will ...". This makes reading the one-line summaries of the git log the clearest to interpret what happened.

Re: Show HN: Generate commit messages using GPT-3

#62

This creates precisely the kind of commit messages that I regularly scold junior developers for :)" In my opinion, commit messages should clarify the intent of WHY you changed things. I can already see WHAT you changed from the diffs. But of course, any tool can only work with the what, they cannot know that these lines are related to a bug report filed in a technically unrelated system.

[deleted]

Re: Show HN: Generate commit messages using GPT-3

#63

This creates precisely the kind of commit messages that I regularly scold junior developers for :)" In my opinion, commit messages should clarify the intent of WHY you changed things. I can already see WHAT you changed from the diffs. But of course, any tool can only work with the what, they cannot know that these lines are related to a bug report filed in a technically unrelated system.

Interesting. I wonder if ChatGPT can be fed data from JIRA or feature ticket implemented by the commit. This could give us the "why"

Re: Show HN: Generate commit messages using GPT-3

#64
post #48
post #9

Earlier quoted context omitted.

Why should the commit message explain why? I thought the point was to give a summary of the changes so that you don’t have to read the full diff.

The subject line should be 'why': Fix 500 due to syntax error accessing /users the body can summarise and expand on (..if you know what I mean) the diff as well as explaining why: Due to in this case was interpreted as a baz, when clearly the author in intended foo, which would return the response with bars here as expected. This commit fixes the issue by adding an explicit semicolon, thus forcing the foo interpretat…

First version sounds passive-aggresive.

Re: Show HN: Generate commit messages using GPT-3

#65

What a great way to feed OpenAI all your source code.

If your code is on Github or you use Copilot, it's already part of it. So this is just taking advantage. Also, didn't we, at this point, establish that source code means nothing. I mean, we could have FB source code today and do nothing with the huge network and compute capability. Unless you have some legal issues, I dont see a peoblem here.

Re: Show HN: Generate commit messages using GPT-3

#66

This creates precisely the kind of commit messages that I regularly scold junior developers for :)" In my opinion, commit messages should clarify the intent of WHY you changed things. I can already see WHAT you changed from the diffs. But of course, any tool can only work with the what, they cannot know that these lines are related to a bug report filed in a technically unrelated system.

I just had a realization. Usually in my private repos I do “what;why” so I can go back to commits when I brake stuff. But I should be using branches for what and commits for why…

Re: Show HN: Generate commit messages using GPT-3

#67
post #9

This creates precisely the kind of commit messages that I regularly scold junior developers for :)" In my opinion, commit messages should clarify the intent of WHY you changed things. I can already see WHAT you changed from the diffs. But of course, any tool can only work with the what, they cannot know that these lines are related to a bug report filed in a technically unrelated system.

Why should the commit message explain why? I thought the point was to give a summary of the changes so that you don’t have to read the full diff.

What's the point of the summary?

But "why" is very important for the future code owners. Year or tho later someone else adding a new fix may have a question about the existing parts to avoid breaking them. And the only thing he can rely is `git blame` to figure out "why it's implemented in this particular way"

Re: Show HN: Generate commit messages using GPT-3

#68
post #48

Earlier quoted context omitted.

The subject line should be 'why': Fix 500 due to syntax error accessing /users the body can summarise and expand on (..if you know what I mean) the diff as well as explaining why: Due to in this case was interpreted as a baz, when clearly the author in intended foo, which would return the response with bars here as expected. This commit fixes the issue by adding an explicit semicolon, thus forcing the foo interpretat…

First version sounds passive-aggresive.

The exact wording really isn't the point, I see what you're saying but it's not what I intended - that's just the lack of a concrete example (something actually arcane and counter-intuitive) making it more difficult. I was imagining writing it from the perspective of 'this took a good bit of looking into why it didn't work like it looks like it should have'.

Re: Show HN: Generate commit messages using GPT-3

#69
post #68

Earlier quoted context omitted.

First version sounds passive-aggresive.

The exact wording really isn't the point, I see what you're saying but it's not what I intended - that's just the lack of a concrete example (something actually arcane and counter-intuitive) making it more difficult. I was imagining writing it from the perspective of 'this took a good bit of looking into why it didn't work like it looks like it should have'.

I'm not sure if it's accidental. Too much detail just sounds as if you not only fixed something but also lodged a formal complaint against whoever touched that place first. Technically it's good because it's very informative and probably noone will read it unless you, yourself made a mistake and the thing you fixed still doesn't work for some cases. Just sounds weird.

But I'd still prefer it to "Added semicolon" for a commit diff that adds semicolon and nothing else. At minimum I'd like to see a link to a ticket that this change is supposed to solve.

Re: Show HN: Generate commit messages using GPT-3

#70
post #5

This creates precisely the kind of commit messages that I regularly scold junior developers for :)" In my opinion, commit messages should clarify the intent of WHY you changed things. I can already see WHAT you changed from the diffs. But of course, any tool can only work with the what, they cannot know that these lines are related to a bug report filed in a technically unrelated system.

Can you give some examples of good commit messages?

Take a look at Wine's commit log. It's really well curated. https://github.com/wine-mirror/wine/commits/master
Post reply on HN