Skip to contentSkip to conversation

scripts/checkpatch.pl: check for placeholders in cover letter patches

PATCH In review Manos Pitsidianakis 5 participants 15 messages Jan 30, 2024 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 scripts/checkpatch.pl: check for placeholders in cover letter patches

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

---
Range-diff against v1:
1: 64b7ec2287 ! 1: 9bf816eb4c scripts/checkpatch.pl: check for placeholders in cover letter patches

    @@ scripts/checkpatch.pl: sub process {
     +# --cover-letter; It is initialized with subject suffix
     +# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
     +		if ($in_header_lines &&
    -+		    $rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with uninitialized subject" .
    -+             " '*** SUBJECT HERE ***'\n$hereline\n");
    ++				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");
     +		}
     +
     +		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with leftover placeholder " .
    -+             "text '*** BLURB HERE ***'\n$hereline\n");
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");
     +		}
     +
      		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
 scripts/checkpatch.pl | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
scripts/checkpatch.pl +14 -0
index 7026895074..9a8d49f1d8 100755
@@ -1650,6 +1650,20 @@ sub process {
 			$non_utf8_charset = 1;
 		}
 
+# Check if this is a cover letter patch produced by git-format-patch
+# --cover-letter; It is initialized with subject suffix
+# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
+		if ($in_header_lines &&
+				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
+			WARN("Patch appears to be a cover letter with " .
+						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");
+		}
+
+		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
+			WARN("Patch appears to be a cover letter with " .
+						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");
+		}
+
 		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
 		    $rawline =~ /$NON_ASCII_UTF8/) {
 			WARN("8-bit UTF-8 used in possible commit log\n" . $herecurr);

base-commit: 11be70677c70fdccd452a3233653949b79e97908

Signature · 1 line
γαῖα πυρί μιχθήτω
#1 lore raw
Quoted 38 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

---
Range-diff against v1:
1: 64b7ec2287 ! 1: 9bf816eb4c scripts/checkpatch.pl: check for placeholders in cover letter patches

    @@ scripts/checkpatch.pl: sub process {
     +# --cover-letter; It is initialized with subject suffix
     +# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
     +		if ($in_header_lines &&
    -+		    $rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with uninitialized subject" .
    -+             " '*** SUBJECT HERE ***'\n$hereline\n");
    ++				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");
     +		}
     +
     +		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with leftover placeholder " .
    -+             "text '*** BLURB HERE ***'\n$hereline\n");
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");
     +		}
     +
      		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
 scripts/checkpatch.pl | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
scripts/checkpatch.pl +0 -0
index 7026895074..9a8d49f1d8 100755

scripts/checkpatch.pl sub process { · line 1657

Quoted 8 lines
scripts/checkpatch.pl +5 -0
@@ -1650,6 +1650,20 @@ sub process {
 			$non_utf8_charset = 1;
 		}
 
+# Check if this is a cover letter patch produced by git-format-patch
+# --cover-letter; It is initialized with subject suffix
+# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
+		if ($in_header_lines &&
+				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {

This continuation line is now hugely over-indented - it should be aligned just after the '('

scripts/checkpatch.pl sub process { · line 1659

Quoted 2 lines
scripts/checkpatch.pl +2 -0
+			WARN("Patch appears to be a cover letter with " .
+						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");

As is this

scripts/checkpatch.pl sub process { · line 1664

Quoted 5 lines
scripts/checkpatch.pl +5 -0
+		}
+
+		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
+			WARN("Patch appears to be a cover letter with " .
+						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");

And this.

Quoted 10 lines
scripts/checkpatch.pl +2 -0
+		}
+
 		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
 		    $rawline =~ /$NON_ASCII_UTF8/) {
 			WARN("8-bit UTF-8 used in possible commit log\n" . $herecurr);

base-commit: 11be70677c70fdccd452a3233653949b79e97908

Signature · 1 line
γαῖα πυρί μιχθήτω

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
Quoted 42 lines · Daniel P. Berrangé
Quoted 41 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

---
Range-diff against v1:
1: 64b7ec2287 ! 1: 9bf816eb4c scripts/checkpatch.pl: check for placeholders in cover letter patches

    @@ scripts/checkpatch.pl: sub process {
     +# --cover-letter; It is initialized with subject suffix
     +# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
     +		if ($in_header_lines &&
    -+		    $rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with uninitialized subject" .
    -+             " '*** SUBJECT HERE ***'\n$hereline\n");
    ++				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");
     +		}
     +
     +		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with leftover placeholder " .
    -+             "text '*** BLURB HERE ***'\n$hereline\n");
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");
     +		}
     +
      		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
 scripts/checkpatch.pl | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
scripts/checkpatch.pl +0 -0
index 7026895074..9a8d49f1d8 100755
@@ -1650,6 +1650,20 @@ sub process {
 			$non_utf8_charset = 1;
 		}
 
Quoted 8 lines

scripts/checkpatch.pl sub process { · line 1657

Quoted 5 lines
scripts/checkpatch.pl +5 -0
+# Check if this is a cover letter patch produced by git-format-patch
+# --cover-letter; It is initialized with subject suffix
+# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
+		if ($in_header_lines &&
+				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {

This continuation line is now hugely over-indented - it should be aligned just after the '('

It is not, it just uses tabs. Like line 2693 in current master:

https://gitlab.com/qemu-project/qemu/-/blob/11be70677c70fdccd452a3233653949b79e97908/scripts/checkpatch.pl#L2693

I will quote the **QEMU Coding Style** again on whitespace:

Quoted 10 lines

Whitespace

Of course, the most important aspect in any coding style is whitespace. Crusty old coders who have trouble spotting the glasses on their noses can tell the difference between a tab and eight spaces from a distance of approximately fifteen parsecs. Many a flamewar has been fought and lost on this issue.

QEMU indents are four spaces. Tabs are never used, except in Makefiles where they have been irreversibly coded into the syntax. Spaces of course are superior to tabs because:

You have just one way to specify whitespace, not two. Ambiguity breeds mistakes.

The confusion surrounding ‘use tabs to indent, spaces to justify’ is gone.

Quoted 7 lines

Tab indents push your code to the right, making your screen seriously unbalanced.

Tabs will be rendered incorrectly on editors who are misconfigured not to use tab stops of eight positions.

Tabs are rendered badly in patches, causing off-by-one errors in almost every line.

It is the QEMU coding style.

I think it's better if we leave this discussion here, and accept v1 which is consistent with the coding style, or this one which is consistent with the inconsistency of the tabs and spaces mix of the checkpatch.pl source code as a compromise, if it is deemed important.

Thanks,
Manos

Quoted 32 lines

scripts/checkpatch.pl sub process { · line 1659

Quoted 3 lines
scripts/checkpatch.pl +2 -0
+			WARN("Patch appears to be a cover letter with " .
+						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");

As is this

scripts/checkpatch.pl sub process { · line 1664

Quoted 5 lines
scripts/checkpatch.pl +5 -0
+		}
+
+		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
+			WARN("Patch appears to be a cover letter with " .
+						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");

And this.

Quoted 10 lines
scripts/checkpatch.pl +2 -0
+		}
+
 		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
 		    $rawline =~ /$NON_ASCII_UTF8/) {
 			WARN("8-bit UTF-8 used in possible commit log\n" . $herecurr);

base-commit: 11be70677c70fdccd452a3233653949b79e97908

Signature · 1 line
γαῖα πυρί μιχθήτω

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#3 lore raw
Quoted 77 lines · Manos Pitsidianakis
Quoted 39 lines · Daniel P. Berrangé
Quoted 38 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

---
Range-diff against v1:
1: 64b7ec2287 ! 1: 9bf816eb4c scripts/checkpatch.pl: check for placeholders in cover letter patches

    @@ scripts/checkpatch.pl: sub process {
     +# --cover-letter; It is initialized with subject suffix
     +# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
     +		if ($in_header_lines &&
    -+		    $rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with uninitialized subject" .
    -+             " '*** SUBJECT HERE ***'\n$hereline\n");
    ++				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");
     +		}
     +
     +		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
    -+        WARN("Patch appears to be a cover letter with leftover placeholder " .
    -+             "text '*** BLURB HERE ***'\n$hereline\n");
    ++			WARN("Patch appears to be a cover letter with " .
    ++						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");
     +		}
     +
      		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
 scripts/checkpatch.pl | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
scripts/checkpatch.pl +0 -0
index 7026895074..9a8d49f1d8 100755
@@ -1650,6 +1650,20 @@ sub process {
 			$non_utf8_charset = 1;
 		}
 +# Check if this is a cover letter patch produced by
Quoted 8 lines

scripts/checkpatch.pl sub process { · line 1657

Quoted 5 lines

git-format-patch

scripts/checkpatch.pl +4 -0
+# --cover-letter; It is initialized with subject suffix
+# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
+		if ($in_header_lines &&
+				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {

This continuation line is now hugely over-indented - it should be aligned just after the '('

It is not, it just uses tabs. Like line 2693 in current master:

https://gitlab.com/qemu-project/qemu/-/blob/11be70677c70fdccd452a3233653949b79e97908/scripts/checkpatch.pl#L2693

I will quote the **QEMU Coding Style** again on whitespace:

Quoted 7 lines

Whitespace
Of course, the most important aspect in any coding style is whitespace. Crusty old coders who have trouble spotting the glasses on their noses can tell the difference between a tab and eight spaces from a distance of approximately fifteen parsecs. Many a flamewar has been fought and lost on this issue.

Quoted 14 lines

QEMU indents are four spaces. Tabs are never used, except in Makefiles where they have been irreversibly coded into the syntax. Spaces of course are superior to tabs because:
You have just one way to specify whitespace, not two. Ambiguity
breeds mistakes.
The confusion surrounding ‘use tabs to indent, spaces to
justify’ is gone.
Tab indents push your code to the right, making your screen
seriously unbalanced.
Tabs will be rendered incorrectly on editors who are
misconfigured not to use tab stops of eight positions.
Tabs are rendered badly in patches, causing off-by-one errors in
almost every line.
It is the QEMU coding style.

Quoted 4 lines

I think it's better if we leave this discussion here, and accept v1 which is consistent with the coding style, or this one which is consistent with the inconsistency of the tabs and spaces mix of the checkpatch.pl source code as a compromise, if it is deemed important.

I suspect the problem is that checkpatch.pl is an import from the Linux source tree which has since had syncs with its upstream as well as a slew of QEMU specific patches. If we don't care about tracking upstream anymore we could bite the bullet and fix indentation going forward.

Of course arguably we should replace it with a python script and reduce our dependence on perl. I'm sure someone had a go at that once but it might have only been a partial undertaking.

Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
#4 lore raw
Quoted 4 lines · Alex Bennée

I suspect the problem is that checkpatch.pl is an import from the Linux source tree which has since had syncs with its upstream as well as a slew of QEMU specific patches. If we don't care about tracking upstream anymore we could bite the bullet and fix indentation going forward.

I had a look at trying to update to be based on a newer version of the Linux checkpatch some years ago, but it turned out to not be a trivial thing to do, and we've only diverged further since then. (Which is unfortunate, because I imagine there have been bugfixes to the perl script's handling of parsing fragments of C code which we'd like.)

-- PMM

#5 lore raw
In reply to Alex Bennée
Quoted 84 lines · Alex Bennée
Quoted 77 lines · Manos Pitsidianakis
Quoted 39 lines · Daniel P. Berrangé
Quoted 38 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

---
Range-diff against v1:
1: 64b7ec2287 ! 1: 9bf816eb4c scripts/checkpatch.pl: check for placeholders in cover letter patches

     @@ scripts/checkpatch.pl: sub process {
      +# --cover-letter; It is initialized with subject suffix
      +# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
      +		if ($in_header_lines &&
     -+		    $rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
     -+        WARN("Patch appears to be a cover letter with uninitialized subject" .
     -+             " '*** SUBJECT HERE ***'\n$hereline\n");
     ++				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
     ++			WARN("Patch appears to be a cover letter with " .
     ++						"uninitialized subject '*** SUBJECT HERE ***'\n$hereline\n");
      +		}
      +
      +		if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
     -+        WARN("Patch appears to be a cover letter with leftover placeholder " .
     -+             "text '*** BLURB HERE ***'\n$hereline\n");
     ++			WARN("Patch appears to be a cover letter with " .
     ++						"leftover placeholder text '*** BLURB HERE ***'\n$hereline\n");
      +		}
      +
       		if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
  scripts/checkpatch.pl | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
scripts/checkpatch.pl +0 -0
index 7026895074..9a8d49f1d8 100755
@@ -1650,6 +1650,20 @@ sub process {
  			$non_utf8_charset = 1;
  		}
  +# Check if this is a cover letter patch produced by
Quoted 8 lines

scripts/checkpatch.pl sub process { · line 1657

Quoted 5 lines

git-format-patch

scripts/checkpatch.pl +4 -0
+# --cover-letter; It is initialized with subject suffix
+# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
+		if ($in_header_lines &&
+				$rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {

This continuation line is now hugely over-indented - it should be aligned just after the '('

It is not, it just uses tabs. Like line 2693 in current master:

https://gitlab.com/qemu-project/qemu/-/blob/11be70677c70fdccd452a3233653949b79e97908/scripts/checkpatch.pl#L2693

I will quote the **QEMU Coding Style** again on whitespace:

Quoted 7 lines

Whitespace
Of course, the most important aspect in any coding style is whitespace. Crusty old coders who have trouble spotting the glasses on their noses can tell the difference between a tab and eight spaces from a distance of approximately fifteen parsecs. Many a flamewar has been fought and lost on this issue.

Quoted 14 lines

QEMU indents are four spaces. Tabs are never used, except in Makefiles where they have been irreversibly coded into the syntax. Spaces of course are superior to tabs because:
You have just one way to specify whitespace, not two. Ambiguity
breeds mistakes.
The confusion surrounding ‘use tabs to indent, spaces to
justify’ is gone.
Tab indents push your code to the right, making your screen
seriously unbalanced.
Tabs will be rendered incorrectly on editors who are
misconfigured not to use tab stops of eight positions.
Tabs are rendered badly in patches, causing off-by-one errors in
almost every line.
It is the QEMU coding style.

Quoted 4 lines

I think it's better if we leave this discussion here, and accept v1 which is consistent with the coding style, or this one which is consistent with the inconsistency of the tabs and spaces mix of the checkpatch.pl source code as a compromise, if it is deemed important.

Quoted 4 lines

I suspect the problem is that checkpatch.pl is an import from the Linux source tree which has since had syncs with its upstream as well as a slew of QEMU specific patches. If we don't care about tracking upstream anymore we could bite the bullet and fix indentation going forward.

We diverged quite some time ago and don't track it anymore AFAICT. Regardless, git tools are clever enough to deal with space changes and a tab/space commit can be added to .git-blame-ignore-revs.

Quoted 4 lines

Of course arguably we should replace it with a python script and reduce our dependence on perl. I'm sure someone had a go at that once but it might have only been a partial undertaking.

#6 lore raw
In reply to Manos Pitsidianakis
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

thanks
-- PMM

#7 lore raw
Quoted 9 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

Quoted 6 lines

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

#8 lore raw
Quoted 15 lines · Manos Pitsidianakis
Quoted 13 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

Quoted 7 lines
Quoted 2 lines

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

Yes, there's a few more 'blurb here' results than 'subject here' results, but they're almost always just where the submitter did provide a proper blurb but then forgot to delete the 'BLURB HERE' line, rather than where there's no blurb at all.

thanks
-- PMM

#9 lore raw
Quoted 24 lines · Peter Maydell
Quoted 21 lines · Manos Pitsidianakis
Quoted 9 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

Quoted 6 lines

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

Quoted 6 lines
Quoted 1 line

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

Yes, there's a few more 'blurb here' results than 'subject here' results, but they're almost always just where the submitter did provide a proper blurb but then forgot to delete the 'BLURB HERE' line, rather than where there's no blurb at all.

Though you said half a dozen times at most.

In general the only comments so far are examples of "moving the goalposts" fallacy, where the argument changes each time and the discussion changes topic every time.

https://en.wikipedia.org/wiki/Moving_the_goalposts

I know it's not anyone's intention in this case, but I'd like to remind everyone that this can be perceived negatively by contributors and demotivate them from contributing to QEMU at all. Let's keep the discussion constructive instead of dismissive. I say this in a completely friendly manner, no negativity intended.

Manos

#10 lore raw
Quoted 26 lines · Manos Pitsidianakis
Quoted 24 lines · Peter Maydell
Quoted 21 lines · Manos Pitsidianakis
Quoted 9 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

Quoted 6 lines

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

Yes, there's a few more 'blurb here' results than 'subject here' results, but they're almost always just where the submitter did provide a proper blurb but then forgot to delete the 'BLURB HERE' line, rather than where there's no blurb at all.

Though you said half a dozen times at most.

Yes, because I was counting 'subject here'.

My question here is really "how much do we care about having checkpatch point out this error?".

thanks
-- PMM

#11 lore raw
Quoted 38 lines · Peter Maydell
Quoted 26 lines · Manos Pitsidianakis
Quoted 24 lines · Peter Maydell
Quoted 21 lines · Manos Pitsidianakis
Quoted 9 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

Quoted 6 lines

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

Yes, there's a few more 'blurb here' results than 'subject here' results, but they're almost always just where the submitter did provide a proper blurb but then forgot to delete the 'BLURB HERE' line, rather than where there's no blurb at all.

Though you said half a dozen times at most.

Quoted 7 lines

Yes, because I was counting 'subject here'.

My question here is really "how much do we care about having checkpatch point out this error?".

thanks
-- PMM

I do, because it gives some peace of mind. But I do not care so much that I'd want to continue this conversation further.

Signature · 2 lines
Manos Pitsidianakis
Emulation and Virtualization Engineer at Linaro Ltd
#12 lore raw

Hi Manos,

Quoted 24 lines · Manos Pitsidianakis
Quoted 23 lines · Peter Maydell
Quoted 20 lines · Manos Pitsidianakis
Quoted 18 lines · Peter Maydell
Quoted 15 lines · Manos Pitsidianakis
Quoted 13 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

This comment is the default --blurb-template from git-publish:
https://github.com/stefanha/git-publish/blob/master/git-publish#L742
As the tool is also used to post patches to other projects, I'd recommend fixing it there at the source.

Somewhere between the pre-publish-send-email and git_send_email() calls you could check cover_letter_path doesn't contain the default blurb.

Quoted 18 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines

Yes, there's a few more 'blurb here' results than 'subject here' results, but they're almost always just where the submitter did provide a proper blurb but then forgot to delete the 'BLURB HERE' line, rather than where there's no blurb at all.

Though you said half a dozen times at most.

Quoted 7 lines

Yes, because I was counting 'subject here'.

My question here is really "how much do we care about having checkpatch point out this error?".

thanks
-- PMM

I do, because it gives some peace of mind. But I do not care so much that I'd want to continue this conversation further.

#13 lore raw
Quoted 34 lines · Philippe Mathieu-Daudé

Hi Manos,

Quoted 30 lines · Manos Pitsidianakis
Quoted 29 lines · Peter Maydell
Quoted 26 lines · Manos Pitsidianakis
Quoted 24 lines · Peter Maydell
Quoted 21 lines · Manos Pitsidianakis
Quoted 9 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

Quoted 6 lines

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

This comment is the default --blurb-template from git-publish:
https://github.com/stefanha/git-publish/blob/master/git-publish#L742
As the tool is also used to post patches to other projects, I'd recommend fixing it there at the source.

It's also in the general 'git format-patch' cover letter template, where the workflow is supposed to be "produce cover letter template, manually edit it, send it". Stray template markers generally are the result of (a) a new contributor not knowing about the 'edit' step or (b) remembering to add the subject and blurb but forgetting to delete the 'blurb' template line so it gets left in at the bottom of the cover letter. So I think it is a check that is within checkpatch.pl's remit.

thanks
-- PMM

#14 lore raw
Quoted 42 lines · Peter Maydell
Quoted 34 lines · Philippe Mathieu-Daudé

Hi Manos,

Quoted 30 lines · Manos Pitsidianakis
Quoted 29 lines · Peter Maydell
Quoted 26 lines · Manos Pitsidianakis
Quoted 24 lines · Peter Maydell
Quoted 21 lines · Manos Pitsidianakis
Quoted 9 lines · Peter Maydell
Quoted 5 lines · Manos Pitsidianakis

Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is initialized with subject suffix " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they exist, warn the user.

Quoted 6 lines

FWIW, as far as I can see from my email archive, this particular mistake has been made by contributors to qemu-devel perhaps half a dozen times at most in the last decade...

thanks
-- PMM

Peter, searching for b:"BLURB HERE" in lore.kernel.org yields about 170 results including these patches.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

https://lore.kernel.org/qemu-devel/?q=b%3A%22BLURB+HERE%22

This comment is the default --blurb-template from git-publish:
https://github.com/stefanha/git-publish/blob/master/git-publish#L742
As the tool is also used to post patches to other projects, I'd recommend fixing it there at the source.

Quoted 8 lines

It's also in the general 'git format-patch' cover letter template, where the workflow is supposed to be "produce cover letter template, manually edit it, send it". Stray template markers generally are the result of (a) a new contributor not knowing about the 'edit' step or (b) remembering to add the subject and blurb but forgetting to delete the 'blurb' template line so it gets left in at the bottom of the cover letter. So I think it is a check that is within checkpatch.pl's remit.

Oh, it is so long since the last time I used git-format-patch manually that I thought this template was a git-publish feature :)