Re: [PATCH v3 5/6] grep: enable recurse-submodules to work on <tree> objects
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 14, 2016, 18:10 UTC
- Message-ID
- <xmqqk2c6x79c.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1478908273-190166-6-git-send-email-bmwill@google.com>
Brandon Williams <bmwill@google.com> writes:
Show 20 quoted lines
> Teach grep to recursively search in submodules when provided with a > <tree> object. This allows grep to search a submodule based on the state > of the submodule that is present in a commit of the super project. > > When grep is provided with a <tree> object, the name of the object is > prefixed to all output. In order to provide uniformity of output > between the parent and child processes the option `--parent-basename` > has been added so that the child can preface all of it's output with the > name of the parent's object instead of the name of the commit SHA1 of > the submodule. This changes output from the command > `git grep -e. -l --recurse-submodules HEAD` from: > HEAD:file > <commit sha1 of submodule>:sub/file > > to: > HEAD:file > HEAD:sub/file > > Signed-off-by: Brandon Williams <bmwill@google.com> > ---
Unrelated tangent, but this makes readers wonder what the updated trailer code would do to the last paragraph ;-). Does it behave sensibly (with some sane definition of sensibleness)?
I am guessing that it would, because neither To: or HEAD: is what we normally recognize as a known trailer block element.