Won't you ever have different kind of work in the future?
find_submodule_by_path(), perhaps?
This cannot happen; you made sure the thing begins with "submodule."
already.
This will miss a misconfigured "submodule.path" (two level).
I can understand if this part were:
subkey = strrchr(key, '.');
if (!subkey || subkey == key + strlen("submodule.") - 1)
return 0;
This will segfault on a misconfigured:
[submodule "xyzzy"]
path
Why is this "error()", not "warning()"?
Have to wonder if it makes easier for the users if this function kept only
"xyzzy" out of "submodule.xyzzy.path", not the whole thing. Cannot judge
without actual callers.
Style?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html