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>

Matthieu Moy committed Sep 6, 2013 at 19:43 UTC 2f0f7f1ce7431a6484506c8c89d5d4648e6aefd4
2 files changed +24 -1
t/t7508-status.sh
+21
@@ -84,6 +84,7 @@ test_expect_success 'status --column' '
84 #
85 # dir1/untracked dir2/untracked output
86 # dir2/modified expect untracked
87 +#
88 EOF
89 COLUMNS=50 git -c status.displayCommentPrefix=true status --column="column dense" >output &&
90 test_i18ncmp expect output
@@ -117,6 +118,7 @@ cat >expect <<\EOF
118 # expect
119 # output
120 # untracked
121 +#
122 EOF
123
124 test_expect_success 'status with status.displayCommentPrefix=true' '
@@ -167,6 +169,7 @@ Untracked files:
169 expect
170 output
171 untracked
172 +
173 EOF
174
175 test_expect_success 'status (advice.statusHints false)' '
@@ -241,6 +244,7 @@ Untracked files:
244 (use "git add <file>..." to include in what will be committed)
245
246 dir2/modified
247 +
248 Ignored files:
249 (use "git add -f <file>..." to include in what will be committed)
250
@@ -250,6 +254,7 @@ Ignored files:
254 expect
255 output
256 untracked
257 +
258 EOF
259 git status --ignored >output &&
260 test_i18ncmp expect output
@@ -308,6 +313,7 @@ Ignored files:
313 expect
314 output
315 untracked
316 +
317 EOF
318 git status --ignored >output &&
319 test_i18ncmp expect output
@@ -430,6 +436,7 @@ Untracked files:
436 expect
437 output
438 untracked
439 +
440 EOF
441 git status -unormal >output &&
442 test_i18ncmp expect output
@@ -488,6 +495,7 @@ Untracked files:
495 expect
496 output
497 untracked
498 +
499 EOF
500 git status -uall >output &&
501 test_i18ncmp expect output
@@ -548,6 +556,7 @@ Untracked files:
556 ../expect
557 ../output
558 ../untracked
559 +
560 EOF
561 (cd dir1 && git status) >output &&
562 test_i18ncmp expect output
@@ -618,6 +627,7 @@ Untracked files:
627 <BLUE>expect<RESET>
628 <BLUE>output<RESET>
629 <BLUE>untracked<RESET>
630 +
631 EOF
632 test_config color.ui always &&
633 git status | test_decode_color >output &&
@@ -747,6 +757,7 @@ Untracked files:
757 expect
758 output
759 untracked
760 +
761 EOF
762 test_config status.relativePaths false &&
763 (cd dir1 && git status) >output &&
@@ -789,6 +800,7 @@ Untracked files:
800 expect
801 output
802 untracked
803 +
804 EOF
805 git commit --dry-run dir1/modified >output &&
806 test_i18ncmp expect output
@@ -838,6 +850,7 @@ Untracked files:
850 expect
851 output
852 untracked
853 +
854 EOF
855 git status >output &&
856 test_i18ncmp expect output
@@ -902,6 +915,7 @@ Untracked files:
915 expect
916 output
917 untracked
918 +
919 EOF
920 git config status.submodulesummary 10 &&
921 git status >output &&
@@ -952,6 +966,7 @@ Untracked files:
966 expect
967 output
968 untracked
969 +
970 no changes added to commit (use "git add" and/or "git commit -a")
971 EOF
972 git commit -m "commit submodule" &&
@@ -1012,6 +1027,7 @@ Untracked files:
1027 expect
1028 output
1029 untracked
1030 +
1031 EOF
1032 git config status.submodulesummary 10 &&
1033 git commit --dry-run --amend >output &&
@@ -1066,6 +1082,7 @@ Untracked files:
1082 expect
1083 output
1084 untracked
1085 +
1086 EOF
1087 echo modified sm/untracked &&
1088 git status --ignore-submodules=untracked >output &&
@@ -1177,6 +1194,7 @@ Untracked files:
1194 expect
1195 output
1196 untracked
1197 +
1198 EOF
1199 git status --ignore-submodules=untracked > output &&
1200 test_i18ncmp expect output
@@ -1238,6 +1256,7 @@ Untracked files:
1256 expect
1257 output
1258 untracked
1259 +
1260 EOF
1261 git status --ignore-submodules=untracked > output &&
1262 test_i18ncmp expect output
@@ -1319,6 +1338,7 @@ cat > expect << EOF
1338 ; expect
1339 ; output
1340 ; untracked
1341 +;
1342 EOF
1343
1344 test_expect_success "status (core.commentchar with submodule summary)" '
@@ -1352,6 +1372,7 @@ Untracked files:
1372 expect
1373 output
1374 untracked
1375 +
1376 no changes added to commit (use "git add" and/or "git commit -a")
1377 EOF
1378 git status --ignore-submodules=all > output &&
wt-status.c
+3 -1
@@ -751,7 +751,7 @@ static void wt_status_print_other(struct wt_status *s,
751
752 strbuf_release(&buf);
753 if (!column_active(s->colopts))
754 - return;
754 + goto conclude;
755
756 strbuf_addf(&buf, "%s%s\t%s",
757 color(WT_STATUS_HEADER, s),
@@ -765,6 +765,8 @@ static void wt_status_print_other(struct wt_status *s,
765 print_columns(&output, s->colopts, &copts);
766 string_list_clear(&output, 0);
767 strbuf_release(&buf);
768 +conclude:
769 + status_printf_ln(s, GIT_COLOR_NORMAL, "");
770 }
771
772 static void wt_status_print_verbose(struct wt_status *s)