• B
    grep: add submodules as a grep source type · 4538eef5
    Brandon Williams 提交于
    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: NBrandon Williams <bmwill@google.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    4538eef5
grep.h 4.8 KB