files_ref_store::submodule: use NULL for the main repository
commit9c7d772b6b716ec5f81afd3922340588985066b8
authorMichael Haggerty <mhagger@alum.mit.edu>
Fri, 10 Feb 2017 11:16:18 +0000 (10 12:16 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Feb 2017 19:13:26 +0000 (10 11:13 -0800)
treeb150a444f4e79ca384f1bbbea1320ad998074a79
parentfbfd0a291596a698773d3f687af3ab4c36a841bf
files_ref_store::submodule: use NULL for the main repository

The old practice of storing the empty string in this member for the main
repository was a holdover from before 00eebe3 (refs: create a base class
"ref_store" for files_ref_store, 2016-09-04), when the submodule was
stored in a flex array at the end of `struct files_ref_store`. Storing
NULL for this case is more idiomatic and a tiny bit less code.

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