summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cli_cstore.h2
-rw-r--r--src/cli_val.h1
-rw-r--r--src/commit/commit-algorithm.cpp2
3 files changed, 4 insertions, 1 deletions
diff --git a/src/cli_cstore.h b/src/cli_cstore.h
index 51ca502..b77d69c 100644
--- a/src/cli_cstore.h
+++ b/src/cli_cstore.h
@@ -136,6 +136,8 @@ boolean execute_list(vtw_node *cur, const vtw_def *def, const char *outbuf);
const char *type_to_name(vtw_type_e type);
int initialize_output(const char *op);
void bye(const char *msg, ...) __attribute__((format(printf, 1, 2), noreturn));
+int redirect_output(void);
+int restore_output(void);
/* functions from cli_objects */
char *get_at_string(void);
diff --git a/src/cli_val.h b/src/cli_val.h
index d3950c7..9d987d3 100644
--- a/src/cli_val.h
+++ b/src/cli_val.h
@@ -105,7 +105,6 @@ extern void release_config_lock(void);
extern int out_fd;
extern FILE *err_stream;
-int restore_output(void);
/* debug hooks? */
#define my_malloc(size, name) malloc(size)
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp
index 43f861f..5f77dfb 100644
--- a/src/commit/commit-algorithm.cpp
+++ b/src/commit/commit-algorithm.cpp
@@ -774,7 +774,9 @@ _execute_hooks(CommitHook hook)
cmd += getCommitHookDir(hook);
cmd += "'";
// not checking return status
+ restore_output();
system(cmd.c_str());
+ redirect_output();
}