Skip to content

Commit cb581b1

Browse files
dschogitster
authored andcommitted
add -i (built-in): send error messages to stderr
The Perl version of that command already does that since a301973 (add -p: print errors in separate color, 2009-02-05). The built-in version's development started by reimplementing the initial version from 5cde71d (git-add --interactive, 2006-12-10) for simplicity, though, which still printed error messages to stdout. Let's fix that by imitating the Perl version's behavior in the built-in version of that command. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d34e450 commit cb581b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

add-interactive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static ssize_t list_and_choose(struct add_i_state *s,
365365

366366
if (from < 0 || from >= items->items.nr ||
367367
(singleton && from + 1 != to)) {
368-
color_fprintf_ln(stdout, s->error_color,
368+
color_fprintf_ln(stderr, s->error_color,
369369
_("Huh (%s)?"), p);
370370
break;
371371
} else if (singleton) {

0 commit comments

Comments
 (0)