Skip to content

Commit

Permalink
docs: Explicitly state that the 'Fixes:' tag shouldn't split lines
Browse files Browse the repository at this point in the history
...and use a commit with an obnoxiously long summary in the example to
make it abundantly clear that keeping the tag on a single line takes
priority over wrapping at 75 columns.  Without the explicit exemption,
one might assume splitting the tag is acceptable, even encouraged, e.g.
due to being conditioned by checkpatch's line length warning.

Per Stephen's scripts[1] and implied by commit bf4daf1 ("checkpatch:
avoid some commit message long line warnings"), splitting the 'Fixes:'
tag across multiple lines is a no-no, presumably because parsing multi-
line tags is unnecessarily painful.

[1] https://lkml.kernel.org/r/[email protected]

Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
Sean Christopherson authored and Jonathan Corbet committed Feb 22, 2019
1 parent 80fcc98 commit 19c3fe2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Documentation/process/submitting-patches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,11 @@ change five years from now.

If your patch fixes a bug in a specific commit, e.g. you found an issue using
``git bisect``, please use the 'Fixes:' tag with the first 12 characters of
the SHA-1 ID, and the one line summary. For example::
the SHA-1 ID, and the one line summary. Do not split the tag across multiple
lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
parsing scripts. For example::

Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")

The following ``git config`` settings can be used to add a pretty format for
outputting the above style in the ``git log`` or ``git show`` commands::
Expand Down

0 comments on commit 19c3fe2

Please sign in to comment.