git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
* [PATCH 0/1] Fix perl error "unescaped left brace in regex" for paranoid update hook
@ 2019-09-10  6:39 Dominic Winkler via GitGitGadget
  2019-09-10  6:39 ` [PATCH 1/1] " Dominic Winkler via GitGitGadget
  2019-09-11 21:47 ` [PATCH v2 0/1] " Dominic Winkler via GitGitGadget
  0 siblings, 2 replies; 6+ messages in thread
From: Dominic Winkler via GitGitGadget @ 2019-09-10  6:39 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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 [d.winkler@flexarts.at]

Dominic Winkler (1):
  Fix perl error "unescaped left brace in regex" for paranoid update
    hook

 contrib/hooks/update-paranoid | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-335%2Fflexarts%2Fmaint-update-paranoid-perlv5.26-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-335/flexarts/maint-update-paranoid-perlv5.26-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/335
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] Fix perl error "unescaped left brace in regex" for paranoid update hook
  2019-09-10  6:39 [PATCH 0/1] Fix perl error "unescaped left brace in regex" for paranoid update hook Dominic Winkler via GitGitGadget
@ 2019-09-10  6:39 ` " Dominic Winkler via GitGitGadget
  2019-09-11 21:28   ` Johannes Schindelin
  2019-09-11 21:47 ` [PATCH v2 0/1] " Dominic Winkler via GitGitGadget
  1 sibling, 1 reply; 6+ messages in thread
From: Dominic Winkler via GitGitGadget @ 2019-09-10  6:39 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Dominic Winkler

From: Dominic Winkler <d.winkler@flexarts.at>

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>
---
 contrib/hooks/update-paranoid | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
index d18b317b2f..fc0a242a4e 100755
--- a/contrib/hooks/update-paranoid
+++ b/contrib/hooks/update-paranoid
@@ -302,13 +302,13 @@ $op = '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 = lc $1;
 			my $v = $data{"user.$k"};
 			next RULE unless defined $v;
 			next RULE if @$v != 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] Fix perl error "unescaped left brace in regex" for paranoid update hook
  2019-09-10  6:39 ` [PATCH 1/1] " Dominic Winkler via GitGitGadget
@ 2019-09-11 21:28   ` Johannes Schindelin
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Schindelin @ 2019-09-11 21:28 UTC (permalink / raw)
  To: Dominic Winkler via GitGitGadget; +Cc: git, Junio C Hamano, Dominic Winkler

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 <d.winkler@flexarts.at>
>
> 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>
> ---
>  contrib/hooks/update-paranoid | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
> index d18b317b2f..fc0a242a4e 100755
> --- a/contrib/hooks/update-paranoid
> +++ b/contrib/hooks/update-paranoid
> @@ -302,13 +302,13 @@ $op = '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 = lc $1;
>  			my $v = $data{"user.$k"};
>  			next RULE unless defined $v;
>  			next RULE if @$v != 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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 0/1] Fix perl error "unescaped left brace in regex" for paranoid update hook
  2019-09-10  6:39 [PATCH 0/1] Fix perl error "unescaped left brace in regex" for paranoid update hook Dominic Winkler via GitGitGadget
  2019-09-10  6:39 ` [PATCH 1/1] " Dominic Winkler via GitGitGadget
@ 2019-09-11 21:47 ` " Dominic Winkler via GitGitGadget
  2019-09-11 21:47   ` [PATCH v2 1/1] contrib/hooks: escape left brace in regex in the " Dominic Winkler via GitGitGadget
  1 sibling, 1 reply; 6+ messages in thread
From: Dominic Winkler via GitGitGadget @ 2019-09-11 21:47 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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 [d.winkler@flexarts.at]

Dominic Winkler (1):
  contrib/hooks: escape left brace in regex in the paranoid update hook

 contrib/hooks/update-paranoid | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-335%2Fflexarts%2Fmaint-update-paranoid-perlv5.26-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-335/flexarts/maint-update-paranoid-perlv5.26-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/335

Range-diff vs v1:

 1:  2743caa22e ! 1:  0d762cfb50 Fix perl error "unescaped left brace in regex" for paranoid update hook
     @@ -1,6 +1,6 @@
      Author: Dominic Winkler <d.winkler@flexarts.at>
      
     -    Fix perl error "unescaped left brace in regex" for paranoid update hook
     +    contrib/hooks: escape left brace in regex in the paranoid update hook
      
          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

-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/1] contrib/hooks: escape left brace in regex in the paranoid update hook
  2019-09-11 21:47 ` [PATCH v2 0/1] " Dominic Winkler via GitGitGadget
@ 2019-09-11 21:47   ` " Dominic Winkler via GitGitGadget
  2019-09-12  8:56     ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: Dominic Winkler via GitGitGadget @ 2019-09-11 21:47 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Dominic Winkler

From: Dominic Winkler <d.winkler@flexarts.at>

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>
---
 contrib/hooks/update-paranoid | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
index d18b317b2f..fc0a242a4e 100755
--- a/contrib/hooks/update-paranoid
+++ b/contrib/hooks/update-paranoid
@@ -302,13 +302,13 @@ $op = '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 = lc $1;
 			my $v = $data{"user.$k"};
 			next RULE unless defined $v;
 			next RULE if @$v != 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] contrib/hooks: escape left brace in regex in the paranoid update hook
  2019-09-11 21:47   ` [PATCH v2 1/1] contrib/hooks: escape left brace in regex in the " Dominic Winkler via GitGitGadget
@ 2019-09-12  8:56     ` Johannes Schindelin
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Schindelin @ 2019-09-12  8:56 UTC (permalink / raw)
  To: Dominic Winkler via GitGitGadget; +Cc: git, Junio C Hamano, Dominic Winkler

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 >= 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-paranoid
> index d18b317b2f..fc0a242a4e 100755
> --- a/contrib/hooks/update-paranoid
> +++ b/contrib/hooks/update-paranoid
> @@ -302,13 +302,13 @@ $op = '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 = lc $1;
>  			my $v = $data{"user.$k"};
>  			next RULE unless defined $v;
>  			next RULE if @$v != 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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10  6:39 [PATCH 0/1] Fix perl error "unescaped left brace in regex" for paranoid update hook Dominic Winkler via GitGitGadget
2019-09-10  6:39 ` [PATCH 1/1] " Dominic Winkler via GitGitGadget
2019-09-11 21:28   ` Johannes Schindelin
2019-09-11 21:47 ` [PATCH v2 0/1] " Dominic Winkler via GitGitGadget
2019-09-11 21:47   ` [PATCH v2 1/1] contrib/hooks: escape left brace in regex in the " Dominic Winkler via GitGitGadget
2019-09-12  8:56     ` Johannes Schindelin

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox