Bug 206322 - Quote file argument to git check-attr
Summary: Quote file argument to git check-attr
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: James Darpinian
URL:
Keywords: InRadar
Depends on:
Blocks: webglangle
  Show dependency treegraph
 
Reported: 2020-01-15 15:43 PST by James Darpinian
Modified: 2020-03-11 17:12 PDT (History)
8 users (show)

See Also:


Attachments
Quote file argument (1.20 KB, patch)
2020-01-15 15:44 PST, James Darpinian
no flags Details | Formatted Diff | Diff
Add test (4.02 KB, patch)
2020-01-27 13:42 PST, James Darpinian
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.