WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145082
prepare-ChangeLog reports function above deleted function as deleted; uninitialized value warning when staged non-empty file for commit
https://bugs.webkit.org/show_bug.cgi?id=145082
Summary
prepare-ChangeLog reports function above deleted function as deleted; uniniti...
Daniel Bates
Reported
2015-05-15 17:13:36 PDT
Perl warns of the use of an uninitialized variable in prepare-ChangeLog when the working copy has a non-empty new file staged for commit: Use of uninitialized value $first_line in pattern match (m//) at Tools/Scripts/prepare-ChangeLog line 644. Without loss of generality, you can reproduce this issue by running the following terminal commands inside the top-level directory of a Git checkout of the WebKit repository: $ echo 'A' > A.txt $ git add A.txt $ Tools/Scripts/prepare-ChangeLog Then you will see output of the form: Running status to find changed, added, or removed files. Reviewing diff to determine which lines changed. Extracting affected function names from source files. fatal: Path 'A.txt' exists on disk, but not in 'HEAD'. Use of uninitialized value $first_line in pattern match (m//) at Tools/Scripts/prepare-ChangeLog line 644. Change author: Daniel Bates <
dabates@apple.com
>. Editing the ./ChangeLog file. -- Please remember to include a detailed description in your ChangeLog entry. -- -- See <
http://webkit.org/coding/contributing.html
> for more info --
Attachments
Patch and unit tests
(13.42 KB, patch)
2015-05-15 17:21 PDT
,
Daniel Bates
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2015-05-15 17:16:11 PDT
The logic for parsing a chunk range line of a unified diff is incorrect in extractLineRange{Before, After}Change(). In addition to causes this bug it also causes prepare-ChangeLog to always emit the name of the function f_0 above a deleted function regardless of whether f_0 changed.
Daniel Bates
Comment 2
2015-05-15 17:21:50 PDT
Created
attachment 253243
[details]
Patch and unit tests
Daniel Bates
Comment 3
2015-05-15 17:24:12 PDT
Comment on
attachment 253243
[details]
Patch and unit tests View in context:
https://bugs.webkit.org/attachment.cgi?id=253243&action=review
> Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/extractLineRangeBeforeAndAfterChange.pl:29 > +use VCSUtils;
Will remove this before landing.
Daniel Bates
Comment 4
2015-05-18 16:56:32 PDT
Committed
r184521
: <
http://trac.webkit.org/changeset/184521
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug