Linus Torvalds expressed frustration over the use of passive voice in merge commit messages, preferring active and imperative language instead.

He provided an example of how commit messages should be rewritten for clarity and consistency across the project.

Torvalds noted that while it’s not a major issue, it does add extra work when he has to rewrite messages to match his preference.

  • Otter@lemmy.ca
    link
    fedilink
    English
    arrow-up
    69
    ·
    edit-2
    1 month ago

    The message:

    "I try to make my merge commit messages be somewhat “cohesive”, and so I often edit the pull request language to match a more standard layout and language. It’s not a big deal, and often it’s literally just about whitespace so that we don’t have fifteen different indentation models and bullet syntaxes. I generally do it as I read through the text anyway, so it’s not like it makes extra work for me.

    But what does make extra work is when some maintainers use passive voice, and then I try to actively rewrite the explanation (or, admittedly, sometimes I just decide I don’t care quite enough about trying to make the messages sound the same).

    So I would ask maintainers to please use active voice, and preferably just imperative."

    Giving an example of a bad commit message, Torvalds provided this example: “In this pull request, the Xyzzy driver error handling was fixed to avoid a NULL pointer dereference.” He believes this should have been written as follows: “This fixes a NULL pointer dereference in …”

    • Hazzard@lemm.ee
      link
      fedilink
      arrow-up
      52
      ·
      1 month ago

      Honestly, makes sense, the active voice version is just… more efficient and easier to parse quickly.

    • naught@sh.itjust.works
      link
      fedilink
      arrow-up
      26
      arrow-down
      1
      ·
      1 month ago

      Weird the example he gave isn’t imperative, which I think would be “Fix a null pointer dereference in …”

    • TeoTwawki@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 month ago

      It’s not a big deal, and often it’s literally just about whitespace so that we don’t have fifteen different indentation models and bullet syntaxes.