- add_work(opt, GREP_SOURCE_SHA1, pathbuf.buf, path, oid);
+ add_work(opt, GREP_SOURCE_OID, pathbuf.buf, path, oid);
- grep_source_init(&gs, GREP_SOURCE_SHA1, pathbuf.buf, path, oid);
+ grep_source_init(&gs, GREP_SOURCE_OID, pathbuf.buf, path, oid);
strbuf_release(&pathbuf);
hit = grep_source(opt, &gs);
strbuf_release(&pathbuf);
hit = grep_source(opt, &gs);
* with the object's name: 'tree-name:filename'. In order to
* provide uniformity of output we want to pass the name of the
* parent project's object name to the submodule so the submodule can
* with the object's name: 'tree-name:filename'. In order to
* provide uniformity of output we want to pass the name of the
* parent project's object name to the submodule so the submodule can
*/
if (gs->identifier && end_of_base)
argv_array_pushf(&cp.args, "--parent-basename=%.*s",
*/
if (gs->identifier && end_of_base)
argv_array_pushf(&cp.args, "--parent-basename=%.*s",
* If there is a tree identifier for the submodule, add the
* rev after adding the submodule options but before the
* pathspecs. To do this we listen for the '--' and insert the
* If there is a tree identifier for the submodule, add the
* rev after adding the submodule options but before the
* pathspecs. To do this we listen for the '--' and insert the
const char *filename, const char *path)
{
if (!is_submodule_initialized(path))
const char *filename, const char *path)
{
if (!is_submodule_initialized(path))
* If searching history, check for the presense of the
* submodule's gitdir before skipping the submodule.
*/
* If searching history, check for the presense of the
* submodule's gitdir before skipping the submodule.
*/
const struct submodule *sub =
submodule_from_path(null_sha1, path);
if (sub)
const struct submodule *sub =
submodule_from_path(null_sha1, path);
if (sub)
- add_work(opt, GREP_SOURCE_SUBMODULE, filename, path, sha1);
+ add_work(opt, GREP_SOURCE_SUBMODULE, filename, path, oid);
- hit |= grep_submodule(opt, entry.oid->hash, base->buf,
+ hit |= grep_submodule(opt, entry.oid, base->buf,