ljs,
@ljs@social.kernel.org avatar

Another case where detailed commit messages really really help.

It blows my mind that any project decides not to provide detailed commit messages when the benefits are so massive...!
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1899ad18c6072d689896badafb81267b0a1092a4

janriemer,

@ljs Tagging @chriskrycho 👆 as we had a discussion about this recently:

https://mastodon.social/@chriskrycho/112328048819169823

ljs,
@ljs@social.kernel.org avatar

@janriemer @chriskrycho Spot on!

As I'm (nearly done) writing a book about mm to learn mm deeply, I totally buy the 'write about it to understand' thing, as I've experienced it first hand, endlessly.

liskin,
@liskin@genserver.social avatar

@ljs How's your experience of commit messages in private repos of your (past) employers, btw?

In my experience, it's almost always much worse than the average open source repo, and nobody (who has a say in it) cares. Tends to irritate me.

6d03,
@6d03@mathstodon.xyz avatar

@liskin @ljs I suppose if you mostly use github to browse the codebase, you can rely on PR descriptions

ljs,
@ljs@social.kernel.org avatar

@6d03 @liskin commits are smaller granularity than PRs and different scope, that doesn't work at all.

It's just laziness it's quite simple

6d03,
@6d03@mathstodon.xyz avatar

@ljs @liskin depends. at $work we squash all commits on PR merge, so it's the same granularity for us.

ljs,
@ljs@social.kernel.org avatar

@6d03 @liskin trying to be more zen in 2024:

I respectfully disagree with this practice :)

6d03,
@6d03@mathstodon.xyz avatar

@ljs @liskin it's certainly debatable, but it does simplify life in the sense that people don't have to worry about cleaning up their commits, which in my experience can get tedious.

ljs,
@ljs@social.kernel.org avatar

@6d03 @liskin yeah this is the 'argument', maybe I'll be less zen and tell you it's just terrible. It's not debatable, it's terrible.

Why are you even using source control?

You end up with a 10,000 line commit? No bisect now, no ability to back port, no description of the logic behind things, no separation of moving code/changing it.

I've seen somebody do a 5,000 line move of code and subtle changes in it - good luck dealing with that as one commit.

You remove all code-specific context, all things that are sub-PR level.

All for what purpose? To make life a little easier or neater?

If people can't be bothered to rebase properly, then why on earth do you think they'd put every bit of detail needed in a PR description?

It's impossible to argue these things anyway, and pointless, because those making the decisions are not the ones dealing with the consequences of this.

I've literally run into every single one of these issues in practice.

And you're commenting on a post where I literally point out the benefit of a high-granularity comment that wouldn't exist in this scheme?

Come on man.

ljs,
@ljs@social.kernel.org avatar

@6d03 @liskin to be clear I"m not attacking you at all :) just have strong feelings on this issue. I'm just attacking the auto-squash concept as an idea.

6d03,
@6d03@mathstodon.xyz avatar

@ljs @liskin no worries.

liskin,
@liskin@genserver.social avatar

@6d03 @ljs Well…

  1. I don't mostly use GitHub to browse the codebase, it's too sluggish even on a superfast laptop that executes javascript in an instant
  2. why do you think the PR descriptions are considerably better than the commit messages (spoiler alert: they are shit)
6d03,
@6d03@mathstodon.xyz avatar

@liskin @ljs Do you have any pointers to best practice guides?

In my corporate auto-squash scenario I tend to write fairly detailed PR descriptions, which I then copy into the merge commit 🤷

Some, though not all of my coworkers apparently also do this.

6d03,
@6d03@mathstodon.xyz avatar

@liskin @ljs

I agree, having all the relevant information in commit messages would be ideal. But what do you do when your project already has its established workflows?

ljs,
@ljs@social.kernel.org avatar

@6d03 @liskin you're a good man for making the effort!

While I (obviously) disagree with auto-squash taking the time to really be detailed in what place you possibly can already adds a ton of value.

I think the guidelines at https://www.kernel.org/doc/html/latest/process/submitting-patches.html are relevant even for other projects (in the 'describe your changes' bit). Obviously tailor accordingly.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • tester
  • tacticalgear
  • ethstaker
  • normalnudes
  • cisconetworking
  • cubers
  • Durango
  • Leos
  • provamag3
  • modclub
  • anitta
  • JUstTest
  • All magazines