summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-08-02 19:49:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-02 21:26:46 (GMT)
commit4c0eeafe4755345b0f4636bf09904cf689703e11 (patch)
tree3465ad439611ae2ff94563878bd8e7c6f5f518de /unpack-trees.c
parentba43964d47ac29eafafd8d475c299c51c8a1ca75 (diff)
downloadgit-4c0eeafe4755345b0f4636bf09904cf689703e11.zip
git-4c0eeafe4755345b0f4636bf09904cf689703e11.tar.gz
git-4c0eeafe4755345b0f4636bf09904cf689703e11.tar.bz2
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>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index dd535bc..05335fe 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -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) {