submodule.c: get_super_prefix_or_empty
commit202275b96b6c3ffc2c380cfb017e4f6a0dd6bddb
authorStefan Beller <sbeller@google.com>
Tue, 14 Mar 2017 21:46:36 +0000 (14 14:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Mar 2017 21:07:16 +0000 (16 14:07 -0700)
tree4d4a30838f8bdbe245d50e1bf1cbb3ce916c1a8a
parent6cd5757c898d845747d9886c71cb5884b56e9702
submodule.c: get_super_prefix_or_empty

In a later patch we need to use the super_prefix, and
in case it is NULL we can just assume it is empty.
Create a helper function for this.

We already have some use cases for this helper function,
convert them, too.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c