Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
documentation
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2016 at 11:29 UTC
Updated:
15 Apr 2024 at 09:19 UTC
Jump to comment: Most recent
Split-off from #2802947: [meta] Use the Git commit message format from AngularJS. AngularJS uses multiple lines for git commit messages.
Pros:
Cons:
?
Discuss and list pros and cons.
Comments
Comment #2
cilefen commentedI do not think it does.
Comment #3
penyaskitoActually, this could make them easier to parse by external tools or d.o for promoting attribution reports or improving traceability.
Comment #4
cilefen commentedComment #5
pfrenssenVery much in favor for having more information in the commit messages. I rely on
git logto find code changes much more than searching on drupal.org.I think the cons in the summary are not really applicable. I would NOT split up the current data over multiple lines, there is absolutely no added value in that. I would KEEP the current format for the first line, so that we have the issue number, the contributors and the issue title on the first line. What I'd like to have in the multiline comment is a short description of WHAT has changed in the commit, and WHY.
The actual con for this is that we have to write a short description for every single issue, that is additional work. Often the issue summary is outdated by the time an issue is committed, so it cannot be directly used for it.
Comment #6
subhojit777Where else we are using the extra information. I know, the usernames mentioned in the commit message is used for the credits.
Really? Only the vital information will be the subject of the message, the rest can be written in the body. For example,
Then we can parse the log and obtain the credit users from 3rd line. Or the tool can identify the first line of commit message body. Whichever approach we choose.
Issue number is a vital information, and should be put as the subject of message.
Comment #19
dwwAt 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.:
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
Comment #20
dwwComment #21
penyaskitoIf 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.
Comment #22
dwwx-posting from #2323715-84: [policy, no patch] Determine format for commit credit for individuals/organizations/customers for more visibility:
Comment #23
kim.pepper#22 I think that adds a lot of value.
Comment #25
quietone commentedEveryone 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 #2323715: [policy, no patch] Determine format for commit credit for individuals/organizations/customers
Comment #26
catchYeah I think this is fine, let's continue in #2323715: [policy, no patch] Determine format for commit credit for individuals/organizations/customers.