Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-07-04 23:26:42 +0400
committerJunio C Hamano <gitster@pobox.com>2009-07-06 13:45:50 +0400
commitc024beb56da679839d61f352d088b9a86823233a (patch)
treece67d37c56575311d409d9b3090dd526d3178e9b /git.c
parentb99d5f40d6a5cba7d7cd7599063b3cd78aa4d219 (diff)
run_command: report failure to execute the program, but optionally don't
In the case where a program was not found, it was still the task of the caller to report an error to the user. Usually, this is an interesting case but only few callers actually reported a specific error (though many call sites report a generic error message regardless of the cause). With this change the error is reported by run_command, but since there is one call site in git.c that does not want that, an option is added to struct child_process, which is used to turn the error off. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 03726eee5e..18240280e8 100644
--- a/git.c
+++ b/git.c
@@ -416,7 +416,7 @@ static void execv_dashed_external(const char **argv)
* if we fail because the command is not found, it is
* OK to return. Otherwise, we just pass along the status code.
*/
- status = run_command_v_opt(argv, 0);
+ status = run_command_v_opt(argv, RUN_SILENT_EXEC_FAILURE);
if (status >= 0 || errno != ENOENT)
exit(status);