mirror of
https://github.com/git/git.git
synced 2024-05-06 20:26:11 +02:00
diff --submodule=diff: don't print failure message twice
When we fail to start a diff command inside a submodule, immediately exit the routine rather than trying to finish the command and printing a second message. Signed-off-by: David Turner <dturner@twosigma.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
f1c0368da4
commit
67f61efbb9
|
@ -720,8 +720,10 @@ void show_submodule_inline_diff(struct diff_options *o, const char *path,
|
|||
strvec_push(&cp.env_array, GIT_WORK_TREE_ENVIRONMENT "=.");
|
||||
}
|
||||
|
||||
if (start_command(&cp))
|
||||
if (start_command(&cp)) {
|
||||
diff_emit_submodule_error(o, "(diff failed)\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
while (strbuf_getwholeline_fd(&sb, cp.out, '\n') != EOF)
|
||||
diff_emit_submodule_pipethrough(o, sb.buf, sb.len);
|
||||
|
|
Loading…
Reference in New Issue