From: Han-Wen Nienhuys Date: Thu, 21 Sep 2017 15:06:26 GMT Subject: [GSoC][PATCH v4 1/4] submodule--helper: introduce get_submodule_displaypath() Message-ID: <20170921150626.4979-1-hanwen@google.com> In-Reply-To: <20170828115558.28297-2-pc44800@gmail.com> 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 = is_dir_sep(super_prefix[len - 1]) ? "%s%s" : "%s/%s"; what if len == 0? The handling of '/' looks like a change from the original.