Bug 230816

Summary: prepare-ChangeLog does not show the correct result with using --git-commit
Product: WebKit Reporter: Hoa Dinh <dvh>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: jbedard, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Hoa Dinh 2021-09-26 21:35:40 PDT
After deleting some function in a commit, using the following command won't show the deleted functions in the list of modified functions.

$ prepare-ChangeLog --no-write --no-style --only-files -g HEAD

The cause of the bug is that the originalFile() function will pick the incorrect reference version of the file to compare with the version of the commit.
Comment 1 Hoa Dinh 2021-09-26 21:40:19 PDT
Created attachment 439313 [details]
Patch
Comment 2 Hoa Dinh 2021-09-26 22:33:30 PDT
Created attachment 439317 [details]
Patch
Comment 3 EWS 2021-09-27 08:50:56 PDT
Committed r283112 (242170@main): <https://commits.webkit.org/242170@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439317 [details].
Comment 4 Radar WebKit Bug Importer 2021-09-27 08:51:16 PDT
<rdar://problem/83575118>
Comment 5 youenn fablet 2021-10-05 03:36:29 PDT
When doing Tools/Scripts/prepare-ChangeLog -g HEAD~1..HEAD -b XYZ, I now get some errors like:
Use of uninitialized value $first_line in pattern match (m//) at Tools/Scripts/prepare-ChangeLog line 783.

Reverting the commit removes the error.