Merge branch 'jc/grep-pcre-loose-ends'
[gitweb.git] / grep.c
diff --git a/grep.c b/grep.c
index 279a55933c2e570ef3bb51da3cfd55357a5b0c86..a947a68a7f26d999db02fa86ccbaa3def8cf78b4 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -16,6 +16,11 @@ static struct grep_opt grep_defaults;
 void init_grep_defaults(void)
 {
        struct grep_opt *opt = &grep_defaults;
+       static int run_once;
+
+       if (run_once)
+               return;
+       run_once++;
 
        memset(opt, 0, sizeof(*opt));
        opt->relative = 1;