Merge 'sequencer-i' into HEAD

This commit is contained in:
Johannes Schindelin
2016-11-29 23:28:57 +01:00
4 changed files with 980 additions and 48 deletions

View File

@@ -589,6 +589,29 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
cmd.clean_on_exit = opt & RUN_CLEAN_ON_EXIT ? 1 : 0;
cmd.dir = dir;
cmd.env = env;
if (opt & RUN_HIDE_STDERR_ON_SUCCESS) {
struct strbuf buf = STRBUF_INIT;
int res;
cmd.err = -1;
if (start_command(&cmd) < 0)
return -1;
if (strbuf_read(&buf, cmd.err, 0) < 0) {
close(cmd.err);
finish_command(&cmd); /* throw away exit code */
return -1;
}
close(cmd.err);
res = finish_command(&cmd);
if (res)
fputs(buf.buf, stderr);
strbuf_release(&buf);
return res;
}
return run_command(&cmd);
}

View File

@@ -72,6 +72,7 @@ extern int run_hook_ve(const char *const *env, const char *name, va_list args);
#define RUN_SILENT_EXEC_FAILURE 8
#define RUN_USING_SHELL 16
#define RUN_CLEAN_ON_EXIT 32
#define RUN_HIDE_STDERR_ON_SUCCESS 64
int run_command_v_opt(const char **argv, int opt);
/*

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,8 @@ const char *git_path_seq_dir(void);
enum replay_action {
REPLAY_REVERT,
REPLAY_PICK
REPLAY_PICK,
REPLAY_INTERACTIVE_REBASE
};
struct replay_opts {
@@ -23,6 +24,7 @@ struct replay_opts {
int allow_empty;
int allow_empty_message;
int keep_redundant_commits;
int verbose;
int mainline;