Skip to content

Commit 8401aa1

Browse files
jacob-kellertorvalds
authored andcommitted
Documentation/SubmittingPatches: describe the Fixes: tag
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>
1 parent ef19470 commit 8401aa1

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
@@ -132,6 +132,20 @@ Example:
132132
platform_set_drvdata(), but left the variable "dev" unused,
133133
delete it.
134134

135+
If your patch fixes a bug in a specific commit, e.g. you found an issue using
136+
git-bisect, please use the 'Fixes:' tag with the first 12 characters of the
137+
SHA-1 ID, and the one line summary.
138+
Example:
139+
140+
Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
141+
142+
The following git-config settings can be used to add a pretty format for
143+
outputting the above style in the git log or git show commands
144+
145+
[core]
146+
abbrev = 12
147+
[pretty]
148+
fixes = Fixes: %h (\"%s\")
135149

136150
3) Separate your changes.
137151

@@ -443,7 +457,7 @@ person it names. This tag documents that potentially interested parties
443457
have been included in the discussion
444458

445459

446-
14) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by:
460+
14) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes:
447461

448462
If this patch fixes a problem reported by somebody else, consider adding a
449463
Reported-by: tag to credit the reporter for their contribution. Please
@@ -498,6 +512,12 @@ idea was not posted in a public forum. That said, if we diligently credit our
498512
idea reporters, they will, hopefully, be inspired to help us again in the
499513
future.
500514

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

502522
15) The canonical patch format
503523

0 commit comments

Comments
 (0)