* [PATCH] Replace manually crafted hex regexes with [:xdigit:]
@ 2019-07-06 15:00 Paul Eggert
0 siblings, 0 replies; only message in thread
From: Paul Eggert @ 2019-07-06 15:00 UTC (permalink / raw)
To: bug-gnulib; +Cc: Konstantin Kharlamov
From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
* build-aux/gitlog-to-changelog (parse_amend_file)
(git_dir_option):
Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
This patch is backported from Emacs (Bug#36167).
---
ChangeLog | 8 ++++++++
build-aux/gitlog-to-changelog | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bce879101..885907d5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-07-06 Konstantin Kharlamov <Hi-Angel@yandex.ru>
+
+ Replace manually crafted hex regexes with [:xdigit:]
+ * build-aux/gitlog-to-changelog (parse_amend_file)
+ (git_dir_option):
+ Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
+ This patch is backported from Emacs (Bug#36167).
+
2019-07-06 Bruno Haible <bruno@clisp.org>
error: Fix documentation.
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 3acfa8b4c..163c48c8e 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -189,7 +189,7 @@ sub parse_amend_file($)
if (!$in_code)
{
- $line =~ /^([0-9a-fA-F]{40})$/
+ $line =~ /^([[:xdigit:]]{40})$/
or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
$fail = 1, next;
$sha = lc $1;
@@ -303,7 +303,7 @@ sub git_dir_option($)
my ($sha, $rest) = split ':', $log, 2;
defined $sha
or die "$ME:$.: malformed log entry\n";
- $sha =~ /^[0-9a-fA-F]{40}$/
+ $sha =~ /^[[:xdigit:]]{40}$/
or die "$ME:$.: invalid SHA1: $sha\n";
my $skipflag = 0;
@@ -391,7 +391,7 @@ sub git_dir_option($)
@skipshas = ();
next;
}
- if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
+ if ($found && $_ =~ /^([[:xdigit:]]{7,}) [^ ]/)
{
push ( @skipshas, $1 );
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-06 15:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-06 15:00 [PATCH] Replace manually crafted hex regexes with [:xdigit:] Paul Eggert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).