summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2164037)
raw | patch | inline | side by side (parent: 2164037)
author | Björn Steinbrink <B.Steinbrink@gmx.de> | |
Wed, 5 Dec 2007 15:11:24 +0000 (16:11 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Dec 2007 19:34:44 +0000 (11:34 -0800) |
Some systems don't return 1 from regexec() when the pattern does not
match (notably HP-UX which returns 20).
Bug identified by Dscho and H.Merijn Brand.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Tested-by: H.Merijn Brand <h.m.brand@xs4all.nl>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
match (notably HP-UX which returns 20).
Bug identified by Dscho and H.Merijn Brand.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Tested-by: H.Merijn Brand <h.m.brand@xs4all.nl>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-config.c | patch | blob | history |
diff --git a/builtin-config.c b/builtin-config.c
index 4c9ded3b1a146c20d24559bbbee267e9be743fd2..6175dc37382833ed1578f352dbeda004f540be0c 100644 (file)
--- a/builtin-config.c
+++ b/builtin-config.c
if (use_key_regexp && regexec(key_regexp, key_, 0, NULL, 0))
return 0;
if (regexp != NULL &&
- (do_not_match ^
- regexec(regexp, (value_?value_:""), 0, NULL, 0)))
+ (do_not_match ^ !!regexec(regexp, (value_?value_:""), 0, NULL, 0)))
return 0;
if (show_keys) {