-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix perl error "unescaped left brace in regex" for paranoid update hook #335
base: maint
Are you sure you want to change the base?
Fix perl error "unescaped left brace in regex" for paranoid update hook #335
Conversation
Welcome to GitGitGadgetHi @flexarts, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests. Please make sure that this Pull Request has a good description, as it will be used as cover letter. Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:
It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code. Contributing the patchesBefore you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a PR comment of the form Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions. If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox ("raw") file corresponding to the mail you want to reply to from the Git mailing list. If you use GMail, you can upload that raw mbox file via: curl -g --user "<EMailAddress>:<Password>" --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt |
/allow flexarts |
Error: User flexarts is not permitted to use GitGitGadget |
@derrickstolee can you please give my user flexarts the permission to use gitgitgadget? |
/allow flexarts |
User flexarts is now allowed to use GitGitGadget. |
/submit |
Submitted as pull.335.git.gitgitgadget@gmail.com |
Hi Johannes,
Thanks for your review. I will change the subject line as proposed.
Cheers,
Dominic
… On 11.09.2019, at 23:31, gitgitgadget[bot] ***@***.***> wrote:
@gitgitgadget[bot] commented on this pull request.
In contrib/hooks/update-paranoid:
> @@ -302,13 +302,13 @@ $op = 'U' if ($op eq 'R'
On the Git mailing list, Johannes Schindelin wrote (reply to this):
Hi Dominic,
all looks good, with one exception: the Subject should start with
`<area>:`, i.e. in this instance something like this would be better:
contrib/hooks: escape left brace in regex in the paranoid update hook
Ciao,
Johannes
On Mon, 9 Sep 2019, Dominic Winkler via GitGitGadget wrote:
> From: Dominic Winkler ***@***.***>
>
> A literal "{" should now be escaped in a pattern starting from perl
> versions >=3D v5.26. In perl v5.22, using a literal { in a regular
> expression was deprecated, and will emit a warning if it isn't escaped: =
\{.
> In v5.26, this won't just warn, it'll cause a syntax error.
>
> (see https://metacpan.org/pod/release/RJBS/perl-5.22.0/pod/perldelta.pod=
)
>
> Signed-off-by: Dominic Winkler ***@***.***>
> ---
> contrib/hooks/update-paranoid | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-parano=
id
> index d18b317b2f..fc0a242a4e 100755
> --- a/contrib/hooks/update-paranoid
> +++ b/contrib/hooks/update-paranoid
> @@ -302,13 +302,13 @@ $op =3D 'U' if ($op eq 'R'
>
> RULE:
> foreach (@$rules) {
> - while (/\${user\.([a-z][a-zA-Z0-9]+)}/) {
> + while (/\$\{user\.([a-z][a-zA-Z0-9]+)}/) {
> my $k =3D lc $1;
> my $v =3D $data{"user.$k"};
> next RULE unless defined $v;
> next RULE if @$v !=3D 1;
> next RULE unless defined $v->[0];
> - s/\${user\.$k}/$v->[0]/g;
> + s/\$\{user\.$k}/$v->[0]/g;
> }
>
> if (/^([AMD ]+)\s+of\s+([^\s]+)\s+for\s+([^\s]+)\s+diff\s+([^\s]+)$/)=
{
> --
> gitgitgadget
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
A literal "{" should now be escaped in a pattern starting from perl versions >= v5.26. In perl v5.22, using a literal { in a regular expression was deprecated, and will emit a warning if it isn't escaped: \{. In v5.26, this won't just warn, it'll cause a syntax error. (see https://metacpan.org/pod/release/RJBS/perl-5.22.0/pod/perldelta.pod) Signed-off-by: Dominic Winkler <d.winkler@flexarts.at>
2743caa
to
0d762cf
Compare
/submit |
Submitted as pull.335.v2.git.gitgitgadget@gmail.com |
@@ -302,13 +302,13 @@ $op = 'U' if ($op eq 'R' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Johannes Schindelin wrote (reply to this):
Hi Dominic,
On Wed, 11 Sep 2019, Dominic Winkler via GitGitGadget wrote:
> From: Dominic Winkler <d.winkler@flexarts.at>
>
> A literal "{" should now be escaped in a pattern starting from perl
> versions >=3D v5.26. In perl v5.22, using a literal { in a regular
> expression was deprecated, and will emit a warning if it isn't escaped: =
\{.
> In v5.26, this won't just warn, it'll cause a syntax error.
>
> (see https://metacpan.org/pod/release/RJBS/perl-5.22.0/pod/perldelta.pod=
)
>
> Signed-off-by: Dominic Winkler <d.winkler@flexarts.at>
Thank you for addressing my concern so promptly. I am far from a Perl
expert, so take this with a train of salt: the patch now looks good to
me!
Ciao,
Johannes
> ---
> contrib/hooks/update-paranoid | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-parano=
id
> index d18b317b2f..fc0a242a4e 100755
> --- a/contrib/hooks/update-paranoid
> +++ b/contrib/hooks/update-paranoid
> @@ -302,13 +302,13 @@ $op =3D 'U' if ($op eq 'R'
>
> RULE:
> foreach (@$rules) {
> - while (/\${user\.([a-z][a-zA-Z0-9]+)}/) {
> + while (/\$\{user\.([a-z][a-zA-Z0-9]+)}/) {
> my $k =3D lc $1;
> my $v =3D $data{"user.$k"};
> next RULE unless defined $v;
> next RULE if @$v !=3D 1;
> next RULE unless defined $v->[0];
> - s/\${user\.$k}/$v->[0]/g;
> + s/\$\{user\.$k}/$v->[0]/g;
> }
>
> if (/^([AMD ]+)\s+of\s+([^\s]+)\s+for\s+([^\s]+)\s+diff\s+([^\s]+)$/)=
{
> --
> gitgitgadget
>
A literal "{" should now be escaped in a pattern starting from perl
versions >= v5.26. In perl v5.22, using a literal { in a regular
expression was deprecated, and will emit a warning if it isn't escaped: {.
In v5.26, this won't just warn, it'll cause a syntax error.
(see https://metacpan.org/pod/release/RJBS/perl-5.22.0/pod/perldelta.pod)
Signed-off-by: Dominic Winkler d.winkler@flexarts.at