From: Brandon Williams Date: Fri, 16 Dec 2016 19:03:19 +0000 (-0800) Subject: grep: add submodules as a grep source type X-Git-Tag: v2.12.0-rc0~76^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4538eef564c81c96f2874ccadc54d3c69cc0e19c?ds=inline;hp=4538eef564c81c96f2874ccadc54d3c69cc0e19c grep: add submodules as a grep source type Add `GREP_SOURCE_SUBMODULE` as a grep_source type and cases for this new type in the various switch statements in grep.c. When initializing a grep_source with type `GREP_SOURCE_SUBMODULE` the identifier can either be NULL (to indicate that the working tree will be used) or a SHA1 (the REV of the submodule to be grep'd). If the identifier is a SHA1 then we want to fall through to the `GREP_SOURCE_SHA1` case to handle the copying of the SHA1. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano ---