]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.h
grep: use submodule-ODB-as-alternate lazy-addition
authorJonathan Tan <jonathantanmy@google.com>
Mon, 16 Aug 2021 21:09:52 +0000 (14:09 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Sep 2021 18:47:49 +0000 (11:47 -0700)
commit8d33c3af0b2113091ea2c2c94990d0332c9551e7
tree5bffcf5ca31a4cdedb6bb0c562d4ed16600ed24e
parenta35e03dee0e8daa442227018ecd180ae1c1b39bc
grep: use submodule-ODB-as-alternate lazy-addition

In the parent commit, Git was taught to add submodule ODBs as alternates
lazily, but grep does not use this because it computes the path to add
directly, not going through add_submodule_odb(). Add an equivalent to
add_submodule_odb() that takes the exact ODB path and teach grep to use
it.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Reviewed-by: Emily Shaffer <emilyshaffer@google.com>
Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/grep.c
submodule.c
submodule.h