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.

    • devfuuu@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      9 hours ago

      This has been the recommendation and the way to do it for decades everywhere I’ve been too.

    • lysdexic@programming.dev
      link
      fedilink
      English
      arrow-up
      12
      ·
      14 hours ago

      good: Add foo interface.

      Another commit style is summarizing what a commit does. In this case it would be someting like:

      Adds foo interface.

      I think this style is more in line with auditing code.

      • theherk@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        13 hours ago

        This indicative mood is something I would send back for correction or correct myself where I am the maintainer. However I understand that although this is pretty consistent through FOSS, it is not a settled matter especially in corpo-land. Most important is that it is consistent within a project. See many differing views here on Stackoverflow, noting the most popular answer though is imperative as Linus requests.

        • Serinus@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          8 hours ago

          Honestly I’ve never thought about it this much. I’ll have to make an effort to stop writing in past tense.