Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b6a6731a
Commit
b6a6731a
authored
Jul 20, 2001
by
Gerd Moellmann
Browse files
(entry_match_p, header_match_p): Fix handling of null or empty
argument to prevent duplicate headers.
parent
41848daa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib-src/grep-changelog
lib-src/grep-changelog
+5
-1
No files found.
lib-src/grep-changelog
View file @
b6a6731a
#! /usr/bin/perl
# $Id: grep-changelog,v 1.
3
200
0/06/14 07:09:42 meyering
Exp $
# $Id: grep-changelog,v 1.
4
200
1/07/20 09:59:19 gerd
Exp $
# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
#
...
...
@@ -89,6 +89,8 @@ if ($version) {
sub
header_match_p
($)
{
my
$header
=
shift
;
return
0
unless
$header
;
# No match if AUTHOR-regexp specified and doesn't match.
return
0
if
$author
&&
$header
!~
/$author/
;
...
...
@@ -117,6 +119,8 @@ sub header_match_p ($) {
sub
entry_match_p
($)
{
my
$entry
=
shift
;
return
0
unless
$entry
;
if
(
$regexp
)
{
return
1
if
(
$entry
=~
/$regexp/
&&
(
!
$exclude
||
$entry
!~
$exclude
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment