Bug 265030 - check-webkit-style errors with multiple git commits on a branch
Summary: check-webkit-style errors with multiple git commits on a branch
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: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
: 268060 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-11-17 06:48 PST by Sam Sneddon [:gsnedders]
Modified: 2024-04-06 15:53 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sneddon [:gsnedders] 2023-11-17 06:48:52 PST
I originally thought this is what Bug 261789 was about, but that actually says "I want to make a PR just for the most recent commit", and the errors from check-webkit-style are therefore incidental there.

We seemingly are passing the output from git-format-patch (an mbox) into the DiffParser, and unsurprisingly passing something that isn't a diff into the DiffParser fails:

To use the example from the other bug:

OpenSource % git webkit pr  --no-commit
ERROR: Unexpected diff format when parsing a chunk: 'From 7ba7f1664729c24f8bb6f7a24bda5a64b71b2deb Mon Sep 17 00:00:00 2001'
ERROR: Unexpected diff format when parsing a chunk: 'From: Simon Fraser <simon.fraser@apple.com>'
ERROR: Unexpected diff format when parsing a chunk: 'Date: Tue, 19 Sep 2023 17:45:18 -0700'
ERROR: Unexpected diff format when parsing a chunk: 'Subject: [PATCH 2/2] Add UnifiedPDF feature flag, PDFPluginBase.* and fix the'
ERROR: Unexpected diff format when parsing a chunk: 'Reviewed by NOBODY (OOPS!).'
ERROR: Unexpected diff format when parsing a chunk: 'Add a feature flag for UnifiedPDF, which is a PDF plugin shared between platforms.'
ERROR: Unexpected diff format when parsing a chunk: 'Add empty PDFPluginBase.h/mm files, and deal with the unified sources fallout.'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/SourcesCocoa.txt:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebKit.xcodeproj/project.pbxproj:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebBadgeClient.cpp.'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebBadgeClient.cpp.'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebProcess/WebCoreSupport/WebBadgeClient.cpp:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.h:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.mm:'
ERROR: Unexpected diff format when parsing a chunk: '(WebKit::RemoteScrollbarsController::shouldRegisterScrollbars const):'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/webpushd/MockPushServiceConnection.mm:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/webpushd/PushService.mm:'
ERROR: Unexpected diff format when parsing a chunk: '* Source/WebKit/webpushd/PushServiceConnection.mm:'

The bug here is that we're passing the output of git-format-patch, rather than git-diff.
Comment 1 Sam Sneddon [:gsnedders] 2023-11-17 11:33:38 PST
Pull request: https://github.com/WebKit/WebKit/pull/20686
Comment 2 Radar WebKit Bug Importer 2023-11-24 06:49:13 PST
<rdar://problem/118772248>
Comment 3 EWS 2024-01-30 12:56:27 PST
Committed 273780@main (81bfcf01ed2b): <https://commits.webkit.org/273780@main>

Reviewed commits have been landed. Closing PR #20686 and removing active labels.
Comment 4 EWS 2024-02-21 09:14:24 PST
Committed 272448.593@safari-7618-branch (4ab0984084ca): <https://commits.webkit.org/272448.593@safari-7618-branch>

Reviewed commits have been landed. Closing PR #1088 and removing active labels.
Comment 5 Sam Sneddon [:gsnedders] 2024-04-06 15:53:52 PDT
*** Bug 268060 has been marked as a duplicate of this bug. ***