diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-01-12 09:13:22 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-14 12:13:04 -0800 |
commit | dba093ddc0341a85f576bbd5227d393a820d930a (patch) | |
tree | e057a919fefb3a13555d8f2623595dc507566b85 /builtin/read-tree.c | |
parent | First batch after 2.20.1 (diff) | |
download | tgif-dba093ddc0341a85f576bbd5227d393a820d930a.tar.xz |
grep: use grep_opt->repo instead of explict repo argument
This command is probably the first one that operates on a repository
other than the_repository, in f9ee2fcdfa (grep: recurse in-process
using 'struct repository' - 2017-08-02). An explicit 'struct
repository *' was added in that commit to pass around the repository
that we're supposed to grep from.
Since 38bbc2ea39 (grep.c: remove implicit dependency on the_index -
2018-09-21). 'struct grep_opt *' carries in itself a repository
parameter for grepping. We should now be able to reuse grep_opt to
hold the submodule repo instead of a separate argument, which is just
room for mistakes.
While at there, use the right reference instead of the_repository and
the_index in this code. I was a bit careless in my attempt to kick
the_repository / the_index out of library code. It's normally safe to
just stick the_repository / the_index in bultin/ code, but it's not
the case for grep.
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/read-tree.c')
0 files changed, 0 insertions, 0 deletions