summaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-07-04 19:26:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-07-06 09:45:50 (GMT)
commitc024beb56da679839d61f352d088b9a86823233a (patch)
treece67d37c56575311d409d9b3090dd526d3178e9b /run-command.h
parentb99d5f40d6a5cba7d7cd7599063b3cd78aa4d219 (diff)
downloadgit-c024beb56da679839d61f352d088b9a86823233a.zip
git-c024beb56da679839d61f352d088b9a86823233a.tar.gz
git-c024beb56da679839d61f352d088b9a86823233a.tar.bz2
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 'run-command.h')
-rw-r--r--run-command.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/run-command.h b/run-command.h
index ac6c09c..0c00b25 100644
--- a/run-command.h
+++ b/run-command.h
@@ -31,6 +31,7 @@ struct child_process {
unsigned no_stdout:1;
unsigned no_stderr:1;
unsigned git_cmd:1; /* if this is to be git sub-command */
+ unsigned silent_exec_failure:1;
unsigned stdout_to_stderr:1;
void (*preexec_cb)(void);
};
@@ -44,6 +45,7 @@ extern int run_hook(const char *index_file, const char *name, ...);
#define RUN_COMMAND_NO_STDIN 1
#define RUN_GIT_CMD 2 /*If this is to be git sub-command */
#define RUN_COMMAND_STDOUT_TO_STDERR 4
+#define RUN_SILENT_EXEC_FAILURE 8
int run_command_v_opt(const char **argv, int opt);
/*