diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-10-09 16:40:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-09 23:21:29 -0700 |
commit | 918d4e1c907983d26b0c4d82d7f7abff4dbec4e5 (patch) | |
tree | 482617f59391d949c55002d1fe026870d02f1ba0 /grep.c | |
parent | c5c31d3381d11903c01d51aff4437fe9f76d0268 (diff) | |
download | git-918d4e1c907983d26b0c4d82d7f7abff4dbec4e5.tar.gz |
revisions: initialize revs->grep_filter using grep_init()
Instead of using the hand-rolled initialization sequence,
use grep_init() to populate the necessary bits. This opens
the door to allow the calling commands to optionally read
grep.* configuration variables via git_config() if they
want to.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |