status: add missing blank line after list of "other" files
List of files in other sections ("Changes to be committed", ...) end with a blank line. It is not the case with the "Untracked files" and "Ignored files" sections. The issue become particularly visible after the #-prefix removal, as the last line (e.g. "nothing added to commit but untracked files present") seems mixed with the untracked files. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1c7969c933
commit
2f0f7f1ce7
@ -84,6 +84,7 @@ test_expect_success 'status --column' '
|
|||||||
#
|
#
|
||||||
# dir1/untracked dir2/untracked output
|
# dir1/untracked dir2/untracked output
|
||||||
# dir2/modified expect untracked
|
# dir2/modified expect untracked
|
||||||
|
#
|
||||||
EOF
|
EOF
|
||||||
COLUMNS=50 git -c status.displayCommentPrefix=true status --column="column dense" >output &&
|
COLUMNS=50 git -c status.displayCommentPrefix=true status --column="column dense" >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -117,6 +118,7 @@ cat >expect <<\EOF
|
|||||||
# expect
|
# expect
|
||||||
# output
|
# output
|
||||||
# untracked
|
# untracked
|
||||||
|
#
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success 'status with status.displayCommentPrefix=true' '
|
test_expect_success 'status with status.displayCommentPrefix=true' '
|
||||||
@ -167,6 +169,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success 'status (advice.statusHints false)' '
|
test_expect_success 'status (advice.statusHints false)' '
|
||||||
@ -241,6 +244,7 @@ Untracked files:
|
|||||||
(use "git add <file>..." to include in what will be committed)
|
(use "git add <file>..." to include in what will be committed)
|
||||||
|
|
||||||
dir2/modified
|
dir2/modified
|
||||||
|
|
||||||
Ignored files:
|
Ignored files:
|
||||||
(use "git add -f <file>..." to include in what will be committed)
|
(use "git add -f <file>..." to include in what will be committed)
|
||||||
|
|
||||||
@ -250,6 +254,7 @@ Ignored files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git status --ignored >output &&
|
git status --ignored >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -308,6 +313,7 @@ Ignored files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git status --ignored >output &&
|
git status --ignored >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -430,6 +436,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git status -unormal >output &&
|
git status -unormal >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -488,6 +495,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git status -uall >output &&
|
git status -uall >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -548,6 +556,7 @@ Untracked files:
|
|||||||
../expect
|
../expect
|
||||||
../output
|
../output
|
||||||
../untracked
|
../untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
(cd dir1 && git status) >output &&
|
(cd dir1 && git status) >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -618,6 +627,7 @@ Untracked files:
|
|||||||
<BLUE>expect<RESET>
|
<BLUE>expect<RESET>
|
||||||
<BLUE>output<RESET>
|
<BLUE>output<RESET>
|
||||||
<BLUE>untracked<RESET>
|
<BLUE>untracked<RESET>
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
test_config color.ui always &&
|
test_config color.ui always &&
|
||||||
git status | test_decode_color >output &&
|
git status | test_decode_color >output &&
|
||||||
@ -747,6 +757,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
test_config status.relativePaths false &&
|
test_config status.relativePaths false &&
|
||||||
(cd dir1 && git status) >output &&
|
(cd dir1 && git status) >output &&
|
||||||
@ -789,6 +800,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git commit --dry-run dir1/modified >output &&
|
git commit --dry-run dir1/modified >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -838,6 +850,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git status >output &&
|
git status >output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -902,6 +915,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git config status.submodulesummary 10 &&
|
git config status.submodulesummary 10 &&
|
||||||
git status >output &&
|
git status >output &&
|
||||||
@ -952,6 +966,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
no changes added to commit (use "git add" and/or "git commit -a")
|
no changes added to commit (use "git add" and/or "git commit -a")
|
||||||
EOF
|
EOF
|
||||||
git commit -m "commit submodule" &&
|
git commit -m "commit submodule" &&
|
||||||
@ -1012,6 +1027,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git config status.submodulesummary 10 &&
|
git config status.submodulesummary 10 &&
|
||||||
git commit --dry-run --amend >output &&
|
git commit --dry-run --amend >output &&
|
||||||
@ -1066,6 +1082,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
echo modified sm/untracked &&
|
echo modified sm/untracked &&
|
||||||
git status --ignore-submodules=untracked >output &&
|
git status --ignore-submodules=untracked >output &&
|
||||||
@ -1177,6 +1194,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git status --ignore-submodules=untracked > output &&
|
git status --ignore-submodules=untracked > output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -1238,6 +1256,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
git status --ignore-submodules=untracked > output &&
|
git status --ignore-submodules=untracked > output &&
|
||||||
test_i18ncmp expect output
|
test_i18ncmp expect output
|
||||||
@ -1319,6 +1338,7 @@ cat > expect << EOF
|
|||||||
; expect
|
; expect
|
||||||
; output
|
; output
|
||||||
; untracked
|
; untracked
|
||||||
|
;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success "status (core.commentchar with submodule summary)" '
|
test_expect_success "status (core.commentchar with submodule summary)" '
|
||||||
@ -1352,6 +1372,7 @@ Untracked files:
|
|||||||
expect
|
expect
|
||||||
output
|
output
|
||||||
untracked
|
untracked
|
||||||
|
|
||||||
no changes added to commit (use "git add" and/or "git commit -a")
|
no changes added to commit (use "git add" and/or "git commit -a")
|
||||||
EOF
|
EOF
|
||||||
git status --ignore-submodules=all > output &&
|
git status --ignore-submodules=all > output &&
|
||||||
|
@ -751,7 +751,7 @@ static void wt_status_print_other(struct wt_status *s,
|
|||||||
|
|
||||||
strbuf_release(&buf);
|
strbuf_release(&buf);
|
||||||
if (!column_active(s->colopts))
|
if (!column_active(s->colopts))
|
||||||
return;
|
goto conclude;
|
||||||
|
|
||||||
strbuf_addf(&buf, "%s%s\t%s",
|
strbuf_addf(&buf, "%s%s\t%s",
|
||||||
color(WT_STATUS_HEADER, s),
|
color(WT_STATUS_HEADER, s),
|
||||||
@ -765,6 +765,8 @@ static void wt_status_print_other(struct wt_status *s,
|
|||||||
print_columns(&output, s->colopts, &copts);
|
print_columns(&output, s->colopts, &copts);
|
||||||
string_list_clear(&output, 0);
|
string_list_clear(&output, 0);
|
||||||
strbuf_release(&buf);
|
strbuf_release(&buf);
|
||||||
|
conclude:
|
||||||
|
status_printf_ln(s, GIT_COLOR_NORMAL, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wt_status_print_verbose(struct wt_status *s)
|
static void wt_status_print_verbose(struct wt_status *s)
|
||||||
|
Loading…
Reference in New Issue
Block a user