cache.h: add GITMODULES_FILE macro
Add a macro to be used when specifying the '.gitmodules' file and convert any existing hard coded '.gitmodules' file strings to use the new macro. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
ba43964d47
commit
4c0eeafe47
@ -286,7 +286,7 @@ static void reload_gitmodules_file(struct index_state *index,
|
||||
for (i = 0; i < index->cache_nr; i++) {
|
||||
struct cache_entry *ce = index->cache[i];
|
||||
if (ce->ce_flags & CE_UPDATE) {
|
||||
int r = strcmp(ce->name, ".gitmodules");
|
||||
int r = strcmp(ce->name, GITMODULES_FILE);
|
||||
if (r < 0)
|
||||
continue;
|
||||
else if (r == 0) {
|
||||
|
Reference in New Issue
Block a user