Skip to content

Commit 10764b6

Browse files
committed
sequencer (rebase -i): show only failed git commit's output
This is the behavior of the shell script version of the interactive rebase, by using the `output` function defined in `git-rebase.sh`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 4316520 commit 10764b6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sequencer.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,14 @@ int sequencer_commit(const char *defmsg, struct replay_opts *opts,
568568
{
569569
char **env = NULL;
570570
struct argv_array array;
571-
int rc;
571+
int opt = RUN_GIT_CMD, rc;
572572
const char *value;
573573

574574
if (IS_REBASE_I()) {
575+
if (edit <= 0) {
576+
opt |= RUN_COMMAND_STDOUT_TO_STDERR;
577+
opt |= RUN_HIDE_STDERR_ON_SUCCESS;
578+
}
575579
if (!defmsg)
576580
defmsg = git_path_rebase_msg();
577581

@@ -617,7 +621,7 @@ int sequencer_commit(const char *defmsg, struct replay_opts *opts,
617621
if (opts->allow_empty_message)
618622
argv_array_push(&array, "--allow-empty-message");
619623

620-
rc = run_command_v_opt_cd_env(array.argv, RUN_GIT_CMD, NULL,
624+
rc = run_command_v_opt_cd_env(array.argv, opt, NULL,
621625
(const char *const *)env);
622626
argv_array_clear(&array);
623627
free(env);

0 commit comments

Comments
 (0)