path: root/builtin/submodule--helper.c
diff options
authorStefan Beller <>2016-05-31 23:59:33 (GMT)
committerJunio C Hamano <>2016-06-01 18:31:49 (GMT)
commitb0f4b4084626ab0f87611acd89030e8bdf0b850e (patch)
tree7e4419d2415305c02bb85eb300389176000835ee /builtin/submodule--helper.c
parent60bd4b1c513bb652cdffad44382046ca872140eb (diff)
submodule--helper: offer a consistent API
In 48308681 (2016-02-29, git submodule update: have a dedicated helper for cloning), the helper communicated errors back only via exit code, and dance with printing '#unmatched' in case of error was left to as it uses the output of the helper and pipes it into shell commands. This change makes the helper consistent by never printing '#unmatched' in the helper but always handling these piping issues in the actual shell script. Signed-off-by: Stefan Beller <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/submodule--helper.c')
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 8da263f..f0b2c4f 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -287,10 +287,8 @@ static int module_list(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, module_list_options,
git_submodule_helper_usage, 0);
- if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0) {
- printf("#unmatched\n");
+ if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0)
return 1;
- }
for (i = 0; i <; i++) {
const struct cache_entry *ce = list.entries[i];