Commit 2f07b65
checkpatch: always parse orig_commit in fixes tag
Do not require the presence of `$balanced_parens` to get the commit SHA;
this allows a `Fixes: deadbeef` tag to get a correct suggestion rather
than a suggestion containing a reference to HEAD.
Given this patch:
: From: Tamir Duberstein <[email protected]>
: Subject: Test patch
: Date: Fri, 25 Oct 2024 19:30:51 -0400
:
: This is a test patch.
:
: Fixes: bd17e03
: Signed-off-by: Tamir Duberstein <[email protected]>
: --- /dev/null
: +++ b/new-file
: @@ -0,0 +1 @@
: +Test.
Before:
WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: c10a7d25e68f ("Test patch")'
After:
WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: bd17e03 ("checkpatch: warn for non-standard fixes tag style")'
The prior behavior incorrectly suggested the patch's own SHA and title
line rather than the referenced commit's. This fixes that.
Ironically this:
Fixes: bd17e03 ("checkpatch: warn for non-standard fixes tag style")
Signed-off-by: Tamir Duberstein <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Dwaipayan Ray <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Louis Peens <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Cc: Niklas Söderlund <[email protected]>
Cc: Philippe Schenker <[email protected]>
Cc: Simon Horman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 013a070 commit 2f07b65
1 file changed
+16
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3209 | 3209 | | |
3210 | 3210 | | |
3211 | 3211 | | |
3212 | | - | |
3213 | | - | |
3214 | | - | |
3215 | | - | |
3216 | | - | |
3217 | | - | |
3218 | | - | |
3219 | | - | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
3220 | 3216 | | |
3221 | 3217 | | |
3222 | | - | |
3223 | | - | |
3224 | | - | |
3225 | | - | |
3226 | | - | |
3227 | | - | |
3228 | | - | |
3229 | | - | |
3230 | | - | |
3231 | | - | |
3232 | | - | |
3233 | | - | |
| 3218 | + | |
3234 | 3219 | | |
3235 | | - | |
| 3220 | + | |
3236 | 3221 | | |
3237 | 3222 | | |
3238 | 3223 | | |
3239 | 3224 | | |
| 3225 | + | |
| 3226 | + | |
3240 | 3227 | | |
3241 | 3228 | | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
3242 | 3237 | | |
3243 | 3238 | | |
3244 | 3239 | | |
| |||
0 commit comments