* Re: [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes [not found] <20200907151417.44453-1-ayush@disroot.org> @ 2020-09-07 20:50 ` Joe Perches [not found] ` <22db634e7be36f4514f0c9b3ecf0060a@disroot.org> 1 sibling, 0 replies; 5+ messages in thread From: Joe Perches @ 2020-09-07 20:50 UTC (permalink / raw) To: Ayush, apw; +Cc: lukas.bulwahn, linux-kernel-mentees, linux-kernel On Mon, 2020-09-07 at 20:44 +0530, Ayush wrote: > Commits which mentioned/referenced "revert commits" in their description will > get error even if they follow the proper syntax. I think all your examples are broken. I think all should start with revert i.e.: Reverts commit <SHA-1> ("description...") > for reference: > commit e8a170ff9a35 ("drm/amdgpu: enable -msse2 for GCC 7.1+ users") > > This patch checks for quotes inside the commit message and adds it > to $orig_desc. > > Earlier, the script just won't update in case of such commit message. > I modified old condition and added new conditions to check possible > patterns. > > Following patters are solved (commit taken as example): > - commit 193392ed9f69 ("Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"") > > - commit 193392ed9f69 ("Revert > "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"") > > - commit 193392ed9f69 ("Revert "drm/amd/display: > add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"") > > - commit 193392ed9f69 > ("Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"") > > Signed-off-by: Ayush <ayush@disroot.org> > --- > scripts/checkpatch.pl | 33 ++++++++++++++++++++++++++------- > 1 file changed, 26 insertions(+), 7 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 149518d2a6a7..e90e13b013d3 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -2862,23 +2862,42 @@ sub process { > $orig_desc = $1; > $hasparens = 1; > } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i && > - defined $rawlines[$linenr] && > - $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { > + defined $rawlines[$linenr]) { > + if ($rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { > + $orig_desc = $1; > + $hasparens = 1; > + } elsif ($rawlines[$linenr] =~ /^\s*\("([^"]+"[^"]+[^"]")"\)/) { > + $orig_desc = $1; > + $hasparens = 1; > + } > + } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && > + defined $rawlines[$linenr]) { > + $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; > $orig_desc = $1; > + if($rawlines[$linenr] =~ /^\s*[^"]+"\)/) { > + $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; > + $orig_desc .= " " . $1; > $hasparens = 1; > - } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && > + } elsif ($rawlines[$linenr] =~ /^\s*"[^"]+""\)/) { > + $rawlines[$linenr] =~ /^\s*("[^"]+")"\)/; > + $orig_desc .= " " . $1; > + $hasparens = 1; > + } > + } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+"[^"]+[^"]")"\)/i) { > + $orig_desc = $1; > + $hasparens = 1; > + } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+"[^"]+$/i && > defined $rawlines[$linenr] && > - $rawlines[$linenr] =~ /^\s*[^"]+"\)/) { > - $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; > + $rawlines[$linenr] =~ /^\s*[^"]+""\)/) { > + $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+"[^"]+)$/i; > $orig_desc = $1; > - $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; > + $rawlines[$linenr] =~ /^\s*([^"]+")"\)/; > $orig_desc .= " " . $1; > $hasparens = 1; > } > > ($id, $description) = git_commit_info($orig_commit, > $id, $orig_desc); > > if (defined($id) && > ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens)) { > ERROR("GIT_COMMIT_ID", ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <22db634e7be36f4514f0c9b3ecf0060a@disroot.org>]
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes [not found] ` <22db634e7be36f4514f0c9b3ecf0060a@disroot.org> @ 2020-09-09 10:06 ` Lukas Bulwahn [not found] ` <3dea1eefdbbf97791bed3f838d4f06a7@disroot.org> 1 sibling, 0 replies; 5+ messages in thread From: Lukas Bulwahn @ 2020-09-09 10:06 UTC (permalink / raw) To: Ayush; +Cc: Joe Perches, apw, lukas.bulwahn, linux-kernel-mentees, linux-kernel On Tue, 8 Sep 2020, Ayush wrote: > > I think all your examples are broken. > > > > I think all should start with revert > > i.e.: Reverts commit <SHA-1> ("description...") > > Actually I am talking about those commits which referenced a revert commit. > > For example: > > If I want to mention a revert commit in my commit message, I will do something like. > > This bug appeared first in commit 1234567890ab ("Revert "abc: foo bar""). > (Just an example) > > Here, according to syntax, it is right but checkpatch.pl gives an error as multiple > quotes in commit messages are not handled in checkpatch.pl. > As the mentor in the linux kernel community bridge program, I usually inform the mentees when the review on the mentee mailing list has successfully concluded to a first acceptable state and I think it is well advised to reach out to the maintainers for further discussion. You did not do that, but just send some patch to the maintainers. That is fully up to you, but I will not support the patch acceptance in any way, and it suggests that you do not see the need to be mentored. If you can land patches without mentoring support successfully, that is great, but then you do not need a mentorship. Now, to the commit: Ayush, your commit message is largely incomprehensible. Your follow-up explanation that was needed should have been in the commit message in the first place. Ayush, you did not sign-off with your full legal name. So, I advice NOT TO TAKE this patch. I did not even start testing and reviewing the code yet. Lukas ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <3dea1eefdbbf97791bed3f838d4f06a7@disroot.org>]
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes [not found] ` <3dea1eefdbbf97791bed3f838d4f06a7@disroot.org> @ 2020-09-09 11:32 ` Lukas Bulwahn 2020-09-09 12:02 ` Joe Perches 0 siblings, 1 reply; 5+ messages in thread From: Lukas Bulwahn @ 2020-09-09 11:32 UTC (permalink / raw) To: Ayush; +Cc: Lukas Bulwahn, linux-kernel-mentees, linux-kernel dropped the maintainers. On Wed, 9 Sep 2020, Ayush wrote: > Sir, > > > As the mentor in the linux kernel community bridge program, I usually > > inform the mentees when the review on the mentee mailing list has > > successfully concluded to a first acceptable state and I think it is well > > advised to reach out to the maintainers for further discussion. > > > > You did not do that, but just send some patch to the maintainers. > > That is fully up to you, but I will not support the patch acceptance in > > any way, and it suggests that you do not see the need to be mentored. > > > > If you can land patches without mentoring support successfully, that is > > great, but then you do not need a mentorship. > > I am extremely sorry for my mistakes. It won't happen again. > > > Now, to the commit: > > > > Ayush, your commit message is largely incomprehensible. > > > > Your follow-up explanation that was needed should have been in the commit > > message in the first place. > > It was my first patch, so I had very little idea of forming commit messages. > I will discuss it with mentors next time before sending the patch next time. > Let us start with the simpler patch and then see if you can write a commit message that convinces Joe to ack your patch. > > Ayush, you did not sign-off with your full legal name. > > My legal name according to all official identification documents of India is Ayush. > I have no surname registered legally. > So should I include "Ayush <ayush@disroot.org>" or do I need to include my last name too (Which is Ayush only)? > Okay. If you say so, I cannot judge but you should try to use a name that others can with a fair chance uniquely identify that is you. The name is used in git log summaries, pull requests, etc.; so, it should be a name that with high chance to refer to one person. Maybe you find a good way that works as suitable name for unique identification? Lukas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes 2020-09-09 11:32 ` Lukas Bulwahn @ 2020-09-09 12:02 ` Joe Perches 2020-09-09 13:10 ` Lukas Bulwahn 0 siblings, 1 reply; 5+ messages in thread From: Joe Perches @ 2020-09-09 12:02 UTC (permalink / raw) To: Lukas Bulwahn, Ayush; +Cc: linux-kernel-mentees, linux-kernel On Wed, 2020-09-09 at 13:32 +0200, Lukas Bulwahn wrote: > dropped the maintainers. > > On Wed, 9 Sep 2020, Ayush wrote: > > > Sir, > > > > > As the mentor in the linux kernel community bridge program, I usually > > > inform the mentees when the review on the mentee mailing list has > > > successfully concluded to a first acceptable state and I think it is well > > > advised to reach out to the maintainers for further discussion. > > > > > > You did not do that, but just send some patch to the maintainers. > > > That is fully up to you, but I will not support the patch acceptance in > > > any way, and it suggests that you do not see the need to be mentored. > > > > > > If you can land patches without mentoring support successfully, that is > > > great, but then you do not need a mentorship. > > > > I am extremely sorry for my mistakes. It won't happen again. > > > > > Now, to the commit: > > > > > > Ayush, your commit message is largely incomprehensible. > > > > > > Your follow-up explanation that was needed should have been in the commit > > > message in the first place. > > > > It was my first patch, so I had very little idea of forming commit messages. > > I will discuss it with mentors next time before sending the patch next time. > > > > Let us start with the simpler patch and then see if you can write a commit > message that convinces Joe to ack your patch. > > > > Ayush, you did not sign-off with your full legal name. > > > > My legal name according to all official identification documents of India is Ayush. > > I have no surname registered legally. > > So should I include "Ayush <ayush@disroot.org>" or do I need to include my last name too (Which is Ayush only)? > > > > Okay. If you say so, I cannot judge but you should try to use a name that > others can with a fair chance uniquely identify that is you. > > The name is used in git log summaries, pull requests, etc.; so, it should > be a name that with high chance to refer to one person. > > Maybe you find a good way that works as suitable name for > unique identification? I believe the Developer's Certificate of Origin (DCO) in Documentation/pr ocess/submitting-patches.rst just asks for a "full name". If Ayush has no surname, then I imagine that his actual full name Ayush should be good enough for the DCO. A line like "Signed-off-by: Ayush <ayush@disroot.org>" should be fine. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes 2020-09-09 12:02 ` Joe Perches @ 2020-09-09 13:10 ` Lukas Bulwahn 0 siblings, 0 replies; 5+ messages in thread From: Lukas Bulwahn @ 2020-09-09 13:10 UTC (permalink / raw) To: Joe Perches; +Cc: Lukas Bulwahn, Ayush, linux-kernel-mentees, linux-kernel On Wed, 9 Sep 2020, Joe Perches wrote: > On Wed, 2020-09-09 at 13:32 +0200, Lukas Bulwahn wrote: > > dropped the maintainers. > > > > On Wed, 9 Sep 2020, Ayush wrote: > > > > > Sir, > > > > > > > As the mentor in the linux kernel community bridge program, I usually > > > > inform the mentees when the review on the mentee mailing list has > > > > successfully concluded to a first acceptable state and I think it is well > > > > advised to reach out to the maintainers for further discussion. > > > > > > > > You did not do that, but just send some patch to the maintainers. > > > > That is fully up to you, but I will not support the patch acceptance in > > > > any way, and it suggests that you do not see the need to be mentored. > > > > > > > > If you can land patches without mentoring support successfully, that is > > > > great, but then you do not need a mentorship. > > > > > > I am extremely sorry for my mistakes. It won't happen again. > > > > > > > Now, to the commit: > > > > > > > > Ayush, your commit message is largely incomprehensible. > > > > > > > > Your follow-up explanation that was needed should have been in the commit > > > > message in the first place. > > > > > > It was my first patch, so I had very little idea of forming commit messages. > > > I will discuss it with mentors next time before sending the patch next time. > > > > > > > Let us start with the simpler patch and then see if you can write a commit > > message that convinces Joe to ack your patch. > > > > > > Ayush, you did not sign-off with your full legal name. > > > > > > My legal name according to all official identification documents of India is Ayush. > > > I have no surname registered legally. > > > So should I include "Ayush <ayush@disroot.org>" or do I need to include my last name too (Which is Ayush only)? > > > > > > > Okay. If you say so, I cannot judge but you should try to use a name that > > others can with a fair chance uniquely identify that is you. > > > > The name is used in git log summaries, pull requests, etc.; so, it should > > be a name that with high chance to refer to one person. > > > > Maybe you find a good way that works as suitable name for > > unique identification? > > I believe the Developer's Certificate of Origin (DCO) in > Documentation/pr > ocess/submitting-patches.rst just asks > for a "full name". > > If Ayush has no surname, then I imagine that his actual > full name Ayush should be good enough for the DCO. > > A line like "Signed-off-by: Ayush <ayush@disroot.org>" > should be fine. > Agree. Let us, Ayush and me, focus on getting some patches technically ready for your review, Joe, and with that, continue to improve checkpatch.pl. Lukas ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-09 13:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200907151417.44453-1-ayush@disroot.org>
2020-09-07 20:50 ` [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes Joe Perches
[not found] ` <22db634e7be36f4514f0c9b3ecf0060a@disroot.org>
2020-09-09 10:06 ` Lukas Bulwahn
[not found] ` <3dea1eefdbbf97791bed3f838d4f06a7@disroot.org>
2020-09-09 11:32 ` Lukas Bulwahn
2020-09-09 12:02 ` Joe Perches
2020-09-09 13:10 ` Lukas Bulwahn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®