summaryrefslogtreecommitdiff
path: root/build-aux/gitlog-to-changelog
diff options
context:
space:
mode:
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>2019-07-06 07:59:49 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-07-06 08:00:16 -0700
commit32a64c67192c9d9a892a9f52473cc402d7e9c135 (patch)
treef72a2ea58f336e104b354dd3baf4f9503502bdab /build-aux/gitlog-to-changelog
parent9c16aa2929fa401e7e02efc7c983da224ab5dfc1 (diff)
downloadgnulib-32a64c67192c9d9a892a9f52473cc402d7e9c135.tar.gz
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).
Diffstat (limited to 'build-aux/gitlog-to-changelog')
-rwxr-xr-xbuild-aux/gitlog-to-changelog6
1 files changed, 3 insertions, 3 deletions
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 3acfa8b4c5..163c48c8e2 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 );
}