[GSoC][PATCH v4 1/4] submodule--helper: introduce get_submodule_displaypath()

2017-09-21 Thread Han-Wen Nienhuys
LGTM with nits. +static char *get_submodule_displaypath(const char *path, const char *prefix) this could do with a comment /* the result should be freed by the caller. */ + } else if (super_prefix) { + int len = strlen(super_prefix); + const char *format =

[GSoC][PATCH v4 1/4] submodule--helper: introduce get_submodule_displaypath()

2017-08-28 Thread Prathamesh Chavan
Introduce function get_submodule_displaypath() to replace the code occurring in submodule_init() for generating displaypath of the submodule with a call to it. This new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder