Skip to content

Commit

Permalink
add -i (built-in): use the same indentation as the Perl version
Browse files Browse the repository at this point in the history
When copying the spaces used to indent non-flat lists in `git add -i`,
one space was appended by mistake. This makes the output of the built-in
version of `git add -i` inconsistent with the Perl version. Let's adjust
the built-in version to produce the same output as the Perl version.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
dscho authored and gitster committed Nov 16, 2020
1 parent 6681e36 commit afae3cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion add-interactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ int run_add_i(struct repository *r, const struct pathspec *ps)
print_file_item_data.color = data.color;
print_file_item_data.reset = data.reset;

strbuf_addstr(&header, " ");
strbuf_addstr(&header, " ");
strbuf_addf(&header, print_file_item_data.modified_fmt,
_("staged"), _("unstaged"), _("path"));
opts.list_opts.header = header.buf;
Expand Down

0 comments on commit afae3cb

Please sign in to comment.