From: Junio C Hamano Date: Mon, 14 Nov 2016 18:10:07 GMT Subject: Re: [PATCH v3 5/6] grep: enable recurse-submodules to work on objects Message-ID: In-Reply-To: <1478908273-190166-6-git-send-email-bmwill@google.com> Brandon Williams writes: > Teach grep to recursively search in submodules when provided with a > 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 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 > :sub/file > > to: > HEAD:file > HEAD:sub/file > > Signed-off-by: Brandon Williams > --- 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.