Discuss if git commit messages should be multiple lines

Created on 4 October 2016, about 8 years ago
Updated 15 April 2024, 7 months ago

Problem/Motivation

Split-off from #2802947: [meta] Use the Git commit message format from AngularJS β†’ . AngularJS uses multiple lines for git commit messages.

Pros:

  • Git log is easier to read because all the independent parts of a commit messages are split over multiple lines.

Cons:

  • Too much information is hidden in long commit messages, but we should document changes in discoverable change records (index by search engines).
  • Moving commit credit of the contributors to a separate line at the very end devalues their contribution.
  • Having the # issue number on a separate lines makes it harder to find it.

Proposed resolution

?

Remaining tasks

Discuss and list pros and cons.

🌱 Plan
Status

Fixed

Version

11.0 πŸ”₯

Component
DocumentationΒ  β†’

Last updated about 2 hours ago

No maintainer
Created by

πŸ‡¦πŸ‡ΉAustria klausi πŸ‡¦πŸ‡Ή Vienna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States dww

    At the bare minimum, I'd be in favor of moving the contributors to a separate line after the issue nid and short 1-line summary.

    E.g.:

    commit d1faffc7256b348628ae667e1180ede541dce3ec
    Date:   Mon Apr 17 23:07:14 2023 +0100
    
        Issue #3340712: Add Single Directory Components as a new experimental module
    
    by e0ipso, alexpott, larowlan, dww, _pratik_, catch, penyaskito, mherchel, pdureau, jonathanshaw, mglaman, idiaz.roncero, geek-merlin, ctrlADel, mrweiner, bnjmnm, longwave, guschilds, cosmicdreams, dreamleaf, ckrina, GΓ‘bor Hojtsy, lauriii, unstatu, markconroy, nod_
    

    We could potentially put each contributor on its own line, perhaps with additional stuff like organizations.

    Maybe even a role they're being credited for (author, reviewer, tester, etc), although that could start to get cumbersome, and in some cases, it's a pretty blurry distinction. E.g. if someone comes in with a very detailed review, suggests new code blocks, etc, are they just a reviewer or are they also sort of an author now?

    But to start, the main thing is making the git log scannable so you can actually see what a commit changed, not a wall of usernames before you can even find out what the commit was for. All sorts of Git tooling expects a 1-line summary for each commit.

    Thanks,
    -Derek

  • πŸ‡ΊπŸ‡ΈUnited States dww
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    If we change this, I'd like to have one contributor per line, and we can use "tagging", but as @dww mentioned that could be hard.

    Github and Gitlab already supports this:

    Approved-by: Jane Doe
    Reviewed-by: John Doe
    Co-Authored-by: James Doe

    And for crediting also organizations if needed, https://gitlab.com/gitlab-org/gitlab/-/issues/327138 is relevant.

  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States dww

    x-posting from #2323715-84: [policy, no patch] Determine format for commit credit for individuals/organizations/customers β†’ for more visibility:

    My only suggestion to the template in the summary is that instead of using "Issue" all the time, why not add value to those bytes and use the 1-word version of the category? Like so:

    Bug #3029061: New layouts are missing config schema
    ...
    Task #3027938: Abstract the contents of LayoutBuilderController into a render element
    ...
    Feature #3015886: Add an in-memory config storage
    ...
    
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    #22 I think that adds a lot of value.

  • Status changed to RTBC 9 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Everyone who has commented on this issue supports using multiple lines in the git commit message.

    The details of that format are currently being discussed in 🌱 [policy, no patch] Determine format for commit credit for individuals/organizations/customers Needs review

  • Status changed to Fixed 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Yeah I think this is fine, let's continue in 🌱 [policy, no patch] Determine format for commit credit for individuals/organizations/customers Needs review .

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024