get_ref_cache(): only create an instance if there is a submodule
commit2eed2780f0e36e4a9038d65d9125cde5d5e1d2c6
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 18 Jun 2016 04:15:12 +0000 (18 06:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jun 2016 18:38:19 +0000 (20 11:38 -0700)
tree4a8529ab521096b0c04423f39457a13475dcab95
parent29a7cf96441241a291edca8136ab3cc80201e7ee
get_ref_cache(): only create an instance if there is a submodule

If there is not a nonbare repository where a submodule is supposedly
located, then don't instantiate a ref_cache for it.

The analogous check can be removed from resolve_gitlink_ref().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c