Skip to content
  • Stefan Beller's avatar
    builtin/grep.c: respect 'submodule.recurse' option · 9071c078
    Stefan Beller authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    In builtin/grep.c we parse the config before evaluating the command line
    options. This makes the task of teaching grep to respect the new config
    option 'submodule.recurse' very easy by just parsing that option.
    
    As an alternative I had implemented a similar structure to treat
    submodules as the fetch/push command have, including
    * aligning the meaning of the 'recurse_submodules' to possible submodule
      values RECURSE_SUBMODULES_* as defined in submodule.h.
    * having a callback to parse the value and
    * reacting to the RECURSE_SUBMODULES_DEFAULT state that was the initial
      state.
    
    However all this is not needed for a true boolean value, so let's keep
    it simple. However this adds another place where "submodule.recurse" is
    parsed.
    
    Signed-off-by: default avatarStefan Beller <sbeller@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9071c078