Bug 206322

Summary: Quote file argument to git check-attr
Product: WebKit Reporter: James Darpinian <jdarpinian>
Component: New BugsAssignee: James Darpinian <jdarpinian>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, darin, dbates, ews-watchlist, jbedard, kbr, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 198948    
Attachments:
Description Flags
Quote file argument
none
Add test none

Description James Darpinian 2020-01-15 15:43:59 PST
Quote file argument to git check-attr
Comment 1 James Darpinian 2020-01-15 15:44:59 PST
Created attachment 387860 [details]
Quote file argument
Comment 2 Alexey Proskuryakov 2020-01-15 17:59:00 PST
Comment on attachment 387860 [details]
Quote file argument

Can a regression test be created for this? I’m not familiar with prepare-ChangeLig tests.
Comment 3 Jonathan Bedard 2020-01-16 09:46:48 PST
Comment on attachment 387860 [details]
Quote file argument

View in context: https://bugs.webkit.org/attachment.cgi?id=387860&action=review

> Tools/Scripts/prepare-ChangeLog:2140
> +        my $command = GIT . " check-attr $attr -- '$file'";

This appears correct, but I'm also curious what made you look into this in the first place. Did you edit a file with a space in the name?
Comment 4 Jonathan Bedard 2020-01-16 09:48:41 PST
(In reply to Alexey Proskuryakov from comment #2)
> Comment on attachment 387860 [details]
> Quote file argument
> 
> Can a regression test be created for this? I’m not familiar with
> prepare-ChangeLig tests.

We should be able to, Tools/Scripts/webkitperl/prepare-ChangeLog_unittest...probably run by test-webkitperl.
Comment 5 James Darpinian 2020-01-27 13:42:42 PST
Created attachment 388898 [details]
Add test
Comment 6 James Darpinian 2020-01-27 13:44:54 PST
Comment on attachment 387860 [details]
Quote file argument

View in context: https://bugs.webkit.org/attachment.cgi?id=387860&action=review

Added a test.

>> Tools/Scripts/prepare-ChangeLog:2140
>> +        my $command = GIT . " check-attr $attr -- '$file'";
> 
> This appears correct, but I'm also curious what made you look into this in the first place. Did you edit a file with a space in the name?

I was updating a third-party dependency, ANGLE, and there's an upstream file with parentheses in the name. Obviously this is not ideal and I can work to rename the upstream file, but this is also a bug that should be fixed.
Comment 7 WebKit Commit Bot 2020-01-28 13:07:52 PST
Comment on attachment 388898 [details]
Add test

Clearing flags on attachment: 388898

Committed r255272: <https://trac.webkit.org/changeset/255272>
Comment 8 WebKit Commit Bot 2020-01-28 13:07:53 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2020-01-28 13:08:17 PST
<rdar://problem/58966431>
Comment 10 Darin Adler 2020-02-01 15:41:03 PST
Not to be a jerk about it, but a better fix would work even for the filenames containing a single quote character.