Subject: Re: [RFC PATCH 3/3] grep: add support for grepping in submodules

From: Chris Packham <[email-masked]>
Date: Thu, 30 Sep 2010 09:48:34 -0700

On 30/09/10 04:24, Jens Lehmann wrote:
> Am 30.09.2010 01:02, schrieb Chris Packham:
>> Yeah this is the part I was struggling with a little. It would be easy
>> to save argv before any option processing but I wondered if that would
>> be frowned upon as an overhead for non-submodule usages.
> 
> Yup, but as you are only copying a pointer array the overhead is very
> small. And if the code gets much easier that way (as I would expect)
> that price is well paid.

With the talk of translating superproject --index into submodule SHA-1,
re-formatting pathspecs and passing the superproject ref-name. It sounds
like making a copy of argv is not going to be that useful. If we did
copy it we'd have to scan it for the things we don't want passed to the
submodule grep.