]> git.ipfire.org Git - thirdparty/git.git/commitdiff
add -i (built-in): use the same indentation as the Perl version
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 16 Nov 2020 16:08:29 +0000 (16:08 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Nov 2020 23:59:02 +0000 (15:59 -0800)
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>
add-interactive.c

index 9126684348fe39569ed3a9f1b2de33c83b5df484..c298a8b80f59647881ec4eb90da422cc688de1f4 100644 (file)
@@ -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;