Bug 241114 - webkit-patch: `git am` strips []-enclosed prefixes (e.g. [CMake][WPE]) in a subject
Summary: webkit-patch: `git am` strips []-enclosed prefixes (e.g. [CMake][WPE]) in a s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-30 18:33 PDT by Fujii Hironori
Modified: 2022-06-03 15:22 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.26 KB, patch)
2022-05-30 18:47 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (1.43 KB, patch)
2022-06-01 17:03 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch for landing (2.26 KB, patch)
2022-06-03 13:40 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2022-05-30 18:33:57 PDT
webkit-patch: `git am` strips prefixes (e.g. [CMake][WPE]) in a subject

For example, attachment#459852 [details] had "[CMake][WPE]" in the subject.
But, it was stripped 251129@main.

We should use `-k` for `git am` and `git format-patch`.

See also:

Bug 240402 – [webkit-patch] Apply patches commit messages
Bug 240256 – [webkit-patch] Include commit messages in patches
Comment 1 Fujii Hironori 2022-05-30 18:47:44 PDT
Created attachment 459876 [details]
Patch
Comment 2 Fujii Hironori 2022-05-30 18:50:41 PDT
Oh, no. COMMIT_MESSAGE isn't shown for the patch. Bugzilla prettypatch doesn't like a patch generated by git format-patch -k?
https://bugs.webkit.org/attachment.cgi?id=459876&action=prettypatch
Comment 3 Fujii Hironori 2022-05-30 18:53:40 PDT
Ah, it expects "[PATCH]" in the subject.

https://github.com/WebKit/WebKit/blob/e647f31fb38449bbe7cf4871edc0ee84ce2c30d2/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb#L71

>    MESSAGE_HEADER_FORMATS = [
>        /^Subject: \[PATCH ?(\d+\/\d+)?\] (.+)/
>    ]
Comment 4 Alexey Proskuryakov 2022-05-30 18:54:33 PDT
Just filed bug 241115 about that.
Comment 5 Fujii Hironori 2022-06-01 16:56:03 PDT
git-am has --keep-non-patch option. This is exactly what I want.
Comment 6 Fujii Hironori 2022-06-01 17:03:20 PDT
Created attachment 459944 [details]
Patch
Comment 7 Jonathan Bedard 2022-06-03 13:20:00 PDT
Comment on attachment 459944 [details]
Patch

I think you need this in buildbot code in Tools/CISupport too
Comment 8 Fujii Hironori 2022-06-03 13:40:02 PDT
Created attachment 460020 [details]
Patch for landing
Comment 9 Fujii Hironori 2022-06-03 14:19:29 PDT
Comment on attachment 460020 [details]
Patch for landing

🤞
Comment 10 EWS 2022-06-03 15:21:32 PDT
Committed r295238 (251293@main): <https://commits.webkit.org/251293@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460020 [details].
Comment 11 Radar WebKit Bug Importer 2022-06-03 15:22:13 PDT
<rdar://problem/94368694>