Skip to content

Commit d3ba566

Browse files
chriscoolgitster
authored andcommitted
sub-process: print the cmd when a capability is unsupported
In handshake_capabilities() we use warning() when a capability is not supported, so the exit code of the function is 0 and no further error is shown. This is a problem because the warning message doesn't tell us which subprocess cmd failed. On the contrary if we cannot write a packet from this function, we use error() and then subprocess_start() outputs: initialization for subprocess '<cmd>' failed so we can know which subprocess cmd failed. Let's improve the warning() message, so that we can know which subprocess cmd failed. Helped-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent fa64a2f commit d3ba566

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sub-process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ static int handshake_capabilities(struct child_process *process,
181181
if (supported_capabilities)
182182
*supported_capabilities |= capabilities[i].flag;
183183
} else {
184-
warning("external filter requested unsupported filter capability '%s'",
185-
p);
184+
warning("subprocess '%s' requested unsupported capability '%s'",
185+
process->argv[0], p);
186186
}
187187
}
188188

0 commit comments

Comments
 (0)