The code is used by the fetch command, which is a main porcelain command,
so we should localize its error messages.

Signed-off-by: Stefan Beller <sbel...@google.com>
---
 submodule.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/submodule.c b/submodule.c
index 74d35b25779..71c042e1371 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1333,8 +1333,7 @@ int fetch_populated_submodules(struct repository *r,
        if (!r->worktree)
                goto out;
 
-       if (repo_read_index(r) < 0)
-               die("index file corrupt");
+       repo_read_index_or_die(r);
 
        argv_array_push(&spf.args, "fetch");
        for (i = 0; i < options->argc; i++)
-- 
2.17.0.582.gccdcbd54c44.dirty

Reply via email to