Add error messages for failed submodule lookup
diff --git a/src/submodule.c b/src/submodule.c
index 0a22e3b..f4fbcd3 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -128,6 +128,10 @@ int git_submodule_lookup(
git_buf_free(&path);
}
+ giterr_set(GITERR_SUBMODULE, (error == GIT_ENOTFOUND) ?
+ "No submodule named '%s'" :
+ "Submodule '%s' has not been added yet", name);
+
return error;
}