Skip to content

Commit 0b052a0

Browse files
jacob-kellerJiri Slaby
authored andcommitted
Documentation/SubmittingPatches: describe the Fixes: tag
commit 8401aa1 upstream. Update the SubmittingPatches process to include howto about the new 'Fixes:' tag to be used when a patch fixes an issue in a previous commit (found by git-bisect for example). Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
1 parent fac842f commit 0b052a0

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

‎Documentation/SubmittingPatches‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,20 @@ Example:
119119
platform_set_drvdata(), but left the variable "dev" unused,
120120
delete it.
121121

122+
If your patch fixes a bug in a specific commit, e.g. you found an issue using
123+
git-bisect, please use the 'Fixes:' tag with the first 12 characters of the
124+
SHA-1 ID, and the one line summary.
125+
Example:
126+
127+
Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
128+
129+
The following git-config settings can be used to add a pretty format for
130+
outputting the above style in the git log or git show commands
131+
132+
[core]
133+
abbrev = 12
134+
[pretty]
135+
fixes = Fixes: %h (\"%s\")
122136

123137
3) Separate your changes.
124138

@@ -430,7 +444,7 @@ person it names. This tag documents that potentially interested parties
430444
have been included in the discussion
431445

432446

433-
14) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by:
447+
14) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes:
434448

435449
If this patch fixes a problem reported by somebody else, consider adding a
436450
Reported-by: tag to credit the reporter for their contribution. Please
@@ -485,6 +499,12 @@ idea was not posted in a public forum. That said, if we diligently credit our
485499
idea reporters, they will, hopefully, be inspired to help us again in the
486500
future.
487501

502+
A Fixes: tag indicates that the patch fixes an issue in a previous commit. It
503+
is used to make it easy to determine where a bug originated, which can help
504+
review a bug fix. This tag also assists the stable kernel team in determining
505+
which stable kernel versions should receive your fix. This is the preferred
506+
method for indicating a bug fixed by the patch. See #2 above for more details.
507+
488508

489509
15) The canonical patch format
490510

0 commit comments

Comments
 (0)