summaryrefslogtreecommitdiff
path: root/builtin/check-attr.c
diff options
context:
space:
mode:
authorLibravatar Heiko Voigt <hvoigt@hvoigt.net>2012-08-14 22:35:27 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-08-14 14:00:17 -0700
commitbe9d0a3a4cbd736911afc10154c7a541129503bd (patch)
treec06beff28e7409a07e3a04c68e2c00a23715c6c2 /builtin/check-attr.c
parentPrepare for 1.7.11.5 (diff)
downloadtgif-be9d0a3a4cbd736911afc10154c7a541129503bd.tar.xz
Let submodule command exit with error status if path does not exist
Various subcommands of the "git submodule" command exited with 0 status even though the path given by the user did not exist. The reason behind that was that they all pipe the output of module_list into the while loop which then does the action on the paths specified by the commandline. Since the exit code of the command on the upstream side of the pipe is ignored by the shell, the status code of "ls-files --error-unmatch" nor "module_list" was not propagated. In case ls-files returns with an error code, we write a special string that is not possible in non error situations, and no other output, so that the downstream can detect the error and die with an error code. The error message that there is an unmatched pathspec comes through stderr directly from ls-files. So the user still gets a hint whats going on. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-attr.c')
0 files changed, 0 insertions, 0 deletions