diff options
Diffstat (limited to 'builtin/grep.c')
| -rw-r--r-- | builtin/grep.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index dfc3c3e8bd..f17d46a06e 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -3,11 +3,11 @@ * * Copyright (c) 2006 Junio C Hamano */ +#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "abspath.h" #include "gettext.h" #include "hex.h" -#include "repository.h" #include "config.h" #include "tag.h" #include "tree-walk.h" @@ -888,7 +888,10 @@ static int pattern_callback(const struct option *opt, const char *arg, return 0; } -int cmd_grep(int argc, const char **argv, const char *prefix) +int cmd_grep(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { int hit = 0; int cached = 0, untracked = 0, opt_exclude = -1; @@ -1133,6 +1136,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) &oid, &oc)) { if (seen_dashdash) die(_("unable to resolve revision: %s"), arg); + object_context_release(&oc); break; } |
