3 # Copyright (c) 2007 Johannes E. Schindelin
6 test_description
='git status'
10 test_expect_success
'status -h in broken repository' '
12 test_when_finished "rm -fr broken" &&
16 echo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&
17 test_expect_code 129 git status -h >usage 2>&1
19 test_i18ngrep "[Uu]sage" broken/usage
22 test_expect_success
'commit -h in broken repository' '
24 test_when_finished "rm -fr broken" &&
28 echo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&
29 test_expect_code 129 git commit -h >usage 2>&1
31 test_i18ngrep "[Uu]sage" broken/usage
34 test_expect_success
'setup' '
48 git commit -m initial &&
52 echo 1 >dir1/modified &&
53 echo 2 >dir2/modified &&
58 test_expect_success
'status (1)' '
59 test_i18ngrep "use \"git rm --cached <file>\.\.\.\" to unstage" output
62 test_expect_success
'status --column' '
63 COLUMNS=50 git status --column="column dense" >output &&
66 # Changes to be committed:
67 # (use "git reset HEAD <file>..." to unstage)
69 # new file: dir2/added
71 # Changes not staged for commit:
72 # (use "git add <file>..." to update what will be committed)
73 # (use "git checkout -- <file>..." to discard changes in working directory)
75 # modified: dir1/modified
78 # (use "git add <file>..." to include in what will be committed)
80 # dir1/untracked dir2/untracked untracked
81 # dir2/modified output
83 test_i18ncmp expect output
88 # Changes to be committed:
89 # (use "git reset HEAD <file>..." to unstage)
91 # new file: dir2/added
93 # Changes not staged for commit:
94 # (use "git add <file>..." to update what will be committed)
95 # (use "git checkout -- <file>..." to discard changes in working directory)
97 # modified: dir1/modified
100 # (use "git add <file>..." to include in what will be committed)
110 test_expect_success
'status (2)' '
111 git status >output &&
112 test_i18ncmp expect output
117 # Changes to be committed:
118 # new file: dir2/added
120 # Changes not staged for commit:
121 # modified: dir1/modified
132 test_expect_success
'status (advice.statusHints false)' '
133 test_config advice.statusHints false &&
134 git status >output &&
135 test_i18ncmp expect output
150 test_expect_success
'status -s' '
152 git status -s >output &&
153 test_cmp expect output
157 test_expect_success
'status with gitignore' '
165 cat >expect <<-\EOF &&
170 git status -s >output &&
171 test_cmp expect output &&
173 cat >expect <<-\EOF &&
184 git status -s --ignored >output &&
185 test_cmp expect output &&
187 cat >expect <<-\EOF &&
189 # Changes to be committed:
190 # (use "git reset HEAD <file>..." to unstage)
192 # new file: dir2/added
194 # Changes not staged for commit:
195 # (use "git add <file>..." to update what will be committed)
196 # (use "git checkout -- <file>..." to discard changes in working directory)
198 # modified: dir1/modified
201 # (use "git add <file>..." to include in what will be committed)
205 # (use "git add -f <file>..." to include in what will be committed)
214 git status --ignored >output &&
215 test_i18ncmp expect output
218 test_expect_success
'status with gitignore (nothing untracked)' '
222 echo "dir2/modified" &&
227 cat >expect <<-\EOF &&
231 git status -s >output &&
232 test_cmp expect output &&
234 cat >expect <<-\EOF &&
245 git status -s --ignored >output &&
246 test_cmp expect output &&
248 cat >expect <<-\EOF &&
250 # Changes to be committed:
251 # (use "git reset HEAD <file>..." to unstage)
253 # new file: dir2/added
255 # Changes not staged for commit:
256 # (use "git add <file>..." to update what will be committed)
257 # (use "git checkout -- <file>..." to discard changes in working directory)
259 # modified: dir1/modified
262 # (use "git add -f <file>..." to include in what will be committed)
272 git status --ignored >output &&
273 test_i18ncmp expect output
290 test_expect_success
'status -s -b' '
292 git status -s -b >output &&
293 test_cmp expect output
297 test_expect_success
'status -s -z -b' '
298 tr "\\n" Q <expect >expect.q &&
299 mv expect.q expect &&
300 git status -s -z -b >output &&
301 nul_to_q <output >output.q &&
302 mv output.q output &&
303 test_cmp expect output
306 test_expect_success
'setup dir3' '
308 : >dir3/untracked1 &&
314 # Changes to be committed:
315 # (use "git reset HEAD <file>..." to unstage)
317 # new file: dir2/added
319 # Changes not staged for commit:
320 # (use "git add <file>..." to update what will be committed)
321 # (use "git checkout -- <file>..." to discard changes in working directory)
323 # modified: dir1/modified
325 # Untracked files not listed (use -u option to show untracked files)
327 test_expect_success
'status -uno' '
328 git status -uno >output &&
329 test_i18ncmp expect output
332 test_expect_success
'status (status.showUntrackedFiles no)' '
333 test_config status.showuntrackedfiles no &&
334 git status >output &&
335 test_i18ncmp expect output
340 # Changes to be committed:
341 # new file: dir2/added
343 # Changes not staged for commit:
344 # modified: dir1/modified
346 # Untracked files not listed
348 test_expect_success
'status -uno (advice.statusHints false)' '
349 test_config advice.statusHints false &&
350 git status -uno >output &&
351 test_i18ncmp expect output
358 test_expect_success
'status -s -uno' '
359 git status -s -uno >output &&
360 test_cmp expect output
363 test_expect_success
'status -s (status.showUntrackedFiles no)' '
364 git config status.showuntrackedfiles no
365 git status -s >output &&
366 test_cmp expect output
371 # Changes to be committed:
372 # (use "git reset HEAD <file>..." to unstage)
374 # new file: dir2/added
376 # Changes not staged for commit:
377 # (use "git add <file>..." to update what will be committed)
378 # (use "git checkout -- <file>..." to discard changes in working directory)
380 # modified: dir1/modified
383 # (use "git add <file>..." to include in what will be committed)
393 test_expect_success
'status -unormal' '
394 git status -unormal >output &&
395 test_i18ncmp expect output
398 test_expect_success
'status (status.showUntrackedFiles normal)' '
399 test_config status.showuntrackedfiles normal
400 git status >output &&
401 test_i18ncmp expect output
415 test_expect_success
'status -s -unormal' '
416 git status -s -unormal >output &&
417 test_cmp expect output
420 test_expect_success
'status -s (status.showUntrackedFiles normal)' '
421 git config status.showuntrackedfiles normal
422 git status -s >output &&
423 test_cmp expect output
428 # Changes to be committed:
429 # (use "git reset HEAD <file>..." to unstage)
431 # new file: dir2/added
433 # Changes not staged for commit:
434 # (use "git add <file>..." to update what will be committed)
435 # (use "git checkout -- <file>..." to discard changes in working directory)
437 # modified: dir1/modified
440 # (use "git add <file>..." to include in what will be committed)
451 test_expect_success
'status -uall' '
452 git status -uall >output &&
453 test_i18ncmp expect output
456 test_expect_success
'status (status.showUntrackedFiles all)' '
457 test_config status.showuntrackedfiles all
458 git status >output &&
459 test_i18ncmp expect output
462 test_expect_success
'teardown dir3' '
476 test_expect_success
'status -s -uall' '
477 git config --unset status.showuntrackedfiles
478 git status -s -uall >output &&
479 test_cmp expect output
481 test_expect_success
'status -s (status.showUntrackedFiles all)' '
482 test_config status.showuntrackedfiles all &&
483 git status -s >output &&
485 test_cmp expect output
490 # Changes to be committed:
491 # (use "git reset HEAD <file>..." to unstage)
493 # new file: ../dir2/added
495 # Changes not staged for commit:
496 # (use "git add <file>..." to update what will be committed)
497 # (use "git checkout -- <file>..." to discard changes in working directory)
502 # (use "git add <file>..." to include in what will be committed)
512 test_expect_success
'status with relative paths' '
513 (cd dir1 && git status) >output &&
514 test_i18ncmp expect output
527 test_expect_success
'status -s with relative paths' '
529 (cd dir1 && git status -s) >output &&
530 test_cmp expect output
545 test_expect_success
'status --porcelain ignores relative paths setting' '
547 (cd dir1 && git status --porcelain) >output &&
548 test_cmp expect output
552 test_expect_success
'setup unique colors' '
554 git config status.color.untracked blue &&
555 git config status.color.branch green
560 # On branch <GREEN>master<RESET>
561 # Changes to be committed:
562 # (use "git reset HEAD <file>..." to unstage)
564 # <GREEN>new file: dir2/added<RESET>
566 # Changes not staged for commit:
567 # (use "git add <file>..." to update what will be committed)
568 # (use "git checkout -- <file>..." to discard changes in working directory)
570 # <RED>modified: dir1/modified<RESET>
573 # (use "git add <file>..." to include in what will be committed)
575 # <BLUE>dir1/untracked<RESET>
576 # <BLUE>dir2/modified<RESET>
577 # <BLUE>dir2/untracked<RESET>
578 # <BLUE>expect<RESET>
579 # <BLUE>output<RESET>
580 # <BLUE>untracked<RESET>
583 test_expect_success
'status with color.ui' '
584 test_config color.ui always &&
585 git status | test_decode_color >output &&
586 test_i18ncmp expect output
589 test_expect_success
'status with color.status' '
590 test_config color.status always &&
591 git status | test_decode_color >output &&
592 test_i18ncmp expect output
596 <RED
>M
<RESET
> dir
1/modified
597 <GREEN
>A
<RESET
> dir
2/added
598 <BLUE
>??
<RESET
> dir
1/untracked
599 <BLUE
>??
<RESET
> dir
2/modified
600 <BLUE
>??
<RESET
> dir
2/untracked
601 <BLUE
>??
<RESET
> expect
602 <BLUE
>??
<RESET
> output
603 <BLUE
>??
<RESET
> untracked
606 test_expect_success
'status -s with color.ui' '
608 git config color.ui always &&
609 git status -s | test_decode_color >output &&
610 test_cmp expect output
614 test_expect_success
'status -s with color.status' '
616 git config --unset color.ui &&
617 git config color.status always &&
618 git status -s | test_decode_color >output &&
619 test_cmp expect output
624 ## <GREEN>master<RESET>
625 <RED
>M
<RESET
> dir
1/modified
626 <GREEN
>A
<RESET
> dir
2/added
627 <BLUE
>??
<RESET
> dir
1/untracked
628 <BLUE
>??
<RESET
> dir
2/modified
629 <BLUE
>??
<RESET
> dir
2/untracked
630 <BLUE
>??
<RESET
> expect
631 <BLUE
>??
<RESET
> output
632 <BLUE
>??
<RESET
> untracked
635 test_expect_success
'status -s -b with color.status' '
637 git status -s -b | test_decode_color >output &&
638 test_cmp expect output
653 test_expect_success
'status --porcelain ignores color.ui' '
655 git config --unset color.status &&
656 git config color.ui always &&
657 git status --porcelain | test_decode_color >output &&
658 test_cmp expect output
662 test_expect_success
'status --porcelain ignores color.status' '
664 git config --unset color.ui &&
665 git config color.status always &&
666 git status --porcelain | test_decode_color >output &&
667 test_cmp expect output
671 # recover unconditionally from color tests
672 git config
--unset color.status
673 git config
--unset color.ui
675 test_expect_success
'status --porcelain respects -b' '
677 git status --porcelain -b >output &&
683 test_cmp expect output
689 # Changes to be committed:
690 # (use "git reset HEAD <file>..." to unstage)
692 # new file: dir2/added
694 # Changes not staged for commit:
695 # (use "git add <file>..." to update what will be committed)
696 # (use "git checkout -- <file>..." to discard changes in working directory)
698 # modified: dir1/modified
701 # (use "git add <file>..." to include in what will be committed)
712 test_expect_success
'status without relative paths' '
714 test_config status.relativePaths false &&
715 (cd dir1 && git status) >output &&
716 test_i18ncmp expect output
731 test_expect_success
'status -s without relative paths' '
733 test_config status.relativePaths false &&
734 (cd dir1 && git status -s) >output &&
735 test_cmp expect output
741 # Changes to be committed:
742 # (use "git reset HEAD <file>..." to unstage)
744 # modified: dir1/modified
747 # (use "git add <file>..." to include in what will be committed)
755 test_expect_success
'dry-run of partial commit excluding new file in index' '
756 git commit --dry-run dir1/modified >output &&
757 test_i18ncmp expect output
761 :100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M dir1/modified
763 test_expect_success
'status refreshes the index' '
766 git diff-files >output &&
767 test_cmp expect output
770 test_expect_success
'setup status submodule summary' '
771 test_create_repo sm && (
775 git commit -m "Add foo"
782 # Changes to be committed:
783 # (use "git reset HEAD <file>..." to unstage)
785 # new file: dir2/added
788 # Changes not staged for commit:
789 # (use "git add <file>..." to update what will be committed)
790 # (use "git checkout -- <file>..." to discard changes in working directory)
792 # modified: dir1/modified
795 # (use "git add <file>..." to include in what will be committed)
804 test_expect_success
'status submodule summary is disabled by default' '
805 git status >output &&
806 test_i18ncmp expect output
809 # we expect the same as the previous test
810 test_expect_success
'status --untracked-files=all does not show submodule' '
811 git status --untracked-files=all >output &&
812 test_i18ncmp expect output
826 test_expect_success
'status -s submodule summary is disabled by default' '
827 git status -s >output &&
828 test_cmp expect output
831 # we expect the same as the previous test
832 test_expect_success
'status -s --untracked-files=all does not show submodule' '
833 git status -s --untracked-files=all >output &&
834 test_cmp expect output
837 head=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
841 # Changes to be committed:
842 # (use "git reset HEAD <file>..." to unstage)
844 # new file: dir2/added
847 # Changes not staged for commit:
848 # (use "git add <file>..." to update what will be committed)
849 # (use "git checkout -- <file>..." to discard changes in working directory)
851 # modified: dir1/modified
853 # Submodule changes to be committed:
855 # * sm 0000000...$head (1):
859 # (use "git add <file>..." to include in what will be committed)
868 test_expect_success
'status submodule summary' '
869 git config status.submodulesummary 10 &&
870 git status >output &&
871 test_i18ncmp expect output
885 test_expect_success
'status -s submodule summary' '
886 git status -s >output &&
887 test_cmp expect output
892 # Changes not staged for commit:
893 # (use "git add <file>..." to update what will be committed)
894 # (use "git checkout -- <file>..." to discard changes in working directory)
896 # modified: dir1/modified
899 # (use "git add <file>..." to include in what will be committed)
907 no changes added to commit (use "git add" and/or "git commit -a")
909 test_expect_success
'status submodule summary (clean submodule): commit' '
910 git commit -m "commit submodule" &&
911 git config status.submodulesummary 10 &&
912 test_must_fail git commit --dry-run >output &&
913 test_i18ncmp expect output &&
914 git status >output &&
915 test_i18ncmp expect output
927 test_expect_success
'status -s submodule summary (clean submodule)' '
928 git status -s >output &&
929 test_cmp expect output
932 test_expect_success
'status -z implies porcelain' '
933 git status --porcelain |
934 "$PERL_PATH" -pe "s/\012/\000/g" >expect &&
935 git status -z >output &&
936 test_cmp expect output
941 # Changes to be committed:
942 # (use "git reset HEAD^1 <file>..." to unstage)
944 # new file: dir2/added
947 # Changes not staged for commit:
948 # (use "git add <file>..." to update what will be committed)
949 # (use "git checkout -- <file>..." to discard changes in working directory)
951 # modified: dir1/modified
953 # Submodule changes to be committed:
955 # * sm 0000000...$head (1):
959 # (use "git add <file>..." to include in what will be committed)
968 test_expect_success
'commit --dry-run submodule summary (--amend)' '
969 git config status.submodulesummary 10 &&
970 git commit --dry-run --amend >output &&
971 test_i18ncmp expect output
974 test_expect_success POSIXPERM
,SANITY
'status succeeds in a read-only repository' '
977 # make dir1/tracked stat-dirty
978 >dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked &&
979 git status -s >output &&
980 ! grep dir1/tracked output &&
981 # make sure "status" succeeded without writing index out
982 git diff-files | grep dir1/tracked
989 (cd sm
&& echo > bar
&& git add bar
&& git commit
-q -m 'Add bar') && git add sm
990 new_head
=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
995 # Changes to be committed:
996 # (use "git reset HEAD <file>..." to unstage)
1000 # Changes not staged for commit:
1001 # (use "git add <file>..." to update what will be committed)
1002 # (use "git checkout -- <file>..." to discard changes in working directory)
1004 # modified: dir1/modified
1006 # Submodule changes to be committed:
1008 # * sm $head...$new_head (1):
1012 # (use "git add <file>..." to include in what will be committed)
1023 test_expect_success
'--ignore-submodules=untracked suppresses submodules with untracked content' '
1024 echo modified sm/untracked &&
1025 git status --ignore-submodules=untracked >output &&
1026 test_i18ncmp expect output
1029 test_expect_success
'.gitmodules ignore=untracked suppresses submodules with untracked content' '
1030 test_config diff.ignoreSubmodules dirty &&
1031 git status >output &&
1032 test_i18ncmp expect output &&
1033 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1034 git config --add -f .gitmodules submodule.subname.path sm &&
1035 git status >output &&
1036 test_i18ncmp expect output &&
1037 git config -f .gitmodules --remove-section submodule.subname
1040 test_expect_success
'.git/config ignore=untracked suppresses submodules with untracked content' '
1041 git config --add -f .gitmodules submodule.subname.ignore none &&
1042 git config --add -f .gitmodules submodule.subname.path sm &&
1043 git config --add submodule.subname.ignore untracked &&
1044 git config --add submodule.subname.path sm &&
1045 git status >output &&
1046 test_i18ncmp expect output &&
1047 git config --remove-section submodule.subname &&
1048 git config --remove-section -f .gitmodules submodule.subname
1051 test_expect_success
'--ignore-submodules=dirty suppresses submodules with untracked content' '
1052 git status --ignore-submodules=dirty >output &&
1053 test_i18ncmp expect output
1056 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with untracked content' '
1057 test_config diff.ignoreSubmodules dirty &&
1058 git status >output &&
1060 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1061 git config --add -f .gitmodules submodule.subname.path sm &&
1062 git status >output &&
1063 test_i18ncmp expect output &&
1064 git config -f .gitmodules --remove-section submodule.subname
1067 test_expect_success
'.git/config ignore=dirty suppresses submodules with untracked content' '
1068 git config --add -f .gitmodules submodule.subname.ignore none &&
1069 git config --add -f .gitmodules submodule.subname.path sm &&
1070 git config --add submodule.subname.ignore dirty &&
1071 git config --add submodule.subname.path sm &&
1072 git status >output &&
1073 test_i18ncmp expect output &&
1074 git config --remove-section submodule.subname &&
1075 git config -f .gitmodules --remove-section submodule.subname
1078 test_expect_success
'--ignore-submodules=dirty suppresses submodules with modified content' '
1079 echo modified >sm/foo &&
1080 git status --ignore-submodules=dirty >output &&
1081 test_i18ncmp expect output
1084 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with modified content' '
1085 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1086 git config --add -f .gitmodules submodule.subname.path sm &&
1087 git status >output &&
1088 test_i18ncmp expect output &&
1089 git config -f .gitmodules --remove-section submodule.subname
1092 test_expect_success
'.git/config ignore=dirty suppresses submodules with modified content' '
1093 git config --add -f .gitmodules submodule.subname.ignore none &&
1094 git config --add -f .gitmodules submodule.subname.path sm &&
1095 git config --add submodule.subname.ignore dirty &&
1096 git config --add submodule.subname.path sm &&
1097 git status >output &&
1098 test_i18ncmp expect output &&
1099 git config --remove-section submodule.subname &&
1100 git config -f .gitmodules --remove-section submodule.subname
1105 # Changes to be committed:
1106 # (use "git reset HEAD <file>..." to unstage)
1110 # Changes not staged for commit:
1111 # (use "git add <file>..." to update what will be committed)
1112 # (use "git checkout -- <file>..." to discard changes in working directory)
1113 # (commit or discard the untracked or modified content in submodules)
1115 # modified: dir1/modified
1116 # modified: sm (modified content)
1118 # Submodule changes to be committed:
1120 # * sm $head...$new_head (1):
1124 # (use "git add <file>..." to include in what will be committed)
1135 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodules with modified content" '
1136 git status --ignore-submodules=untracked > output &&
1137 test_i18ncmp expect output
1140 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
1141 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1142 git config --add -f .gitmodules submodule.subname.path sm &&
1143 git status >output &&
1144 test_i18ncmp expect output &&
1145 git config -f .gitmodules --remove-section submodule.subname
1148 test_expect_success
".git/config ignore=untracked doesn't suppress submodules with modified content" '
1149 git config --add -f .gitmodules submodule.subname.ignore none &&
1150 git config --add -f .gitmodules submodule.subname.path sm &&
1151 git config --add submodule.subname.ignore untracked &&
1152 git config --add submodule.subname.path sm &&
1153 git status >output &&
1154 test_i18ncmp expect output &&
1155 git config --remove-section submodule.subname &&
1156 git config -f .gitmodules --remove-section submodule.subname
1159 head2
=$
(cd sm
&& git commit
-q -m "2nd commit" foo
&& git rev-parse
--short=7 --verify HEAD
)
1163 # Changes to be committed:
1164 # (use "git reset HEAD <file>..." to unstage)
1168 # Changes not staged for commit:
1169 # (use "git add <file>..." to update what will be committed)
1170 # (use "git checkout -- <file>..." to discard changes in working directory)
1172 # modified: dir1/modified
1173 # modified: sm (new commits)
1175 # Submodule changes to be committed:
1177 # * sm $head...$new_head (1):
1180 # Submodules changed but not updated:
1182 # * sm $new_head...$head2 (1):
1186 # (use "git add <file>..." to include in what will be committed)
1197 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodule summary" '
1198 git status --ignore-submodules=untracked > output &&
1199 test_i18ncmp expect output
1202 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodule summary" '
1203 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1204 git config --add -f .gitmodules submodule.subname.path sm &&
1205 git status >output &&
1206 test_i18ncmp expect output &&
1207 git config -f .gitmodules --remove-section submodule.subname
1210 test_expect_success
".git/config ignore=untracked doesn't suppress submodule summary" '
1211 git config --add -f .gitmodules submodule.subname.ignore none &&
1212 git config --add -f .gitmodules submodule.subname.path sm &&
1213 git config --add submodule.subname.ignore untracked &&
1214 git config --add submodule.subname.path sm &&
1215 git status >output &&
1216 test_i18ncmp expect output &&
1217 git config --remove-section submodule.subname &&
1218 git config -f .gitmodules --remove-section submodule.subname
1221 test_expect_success
"--ignore-submodules=dirty doesn't suppress submodule summary" '
1222 git status --ignore-submodules=dirty > output &&
1223 test_i18ncmp expect output
1225 test_expect_success
".gitmodules ignore=dirty doesn't suppress submodule summary" '
1226 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1227 git config --add -f .gitmodules submodule.subname.path sm &&
1228 git status >output &&
1229 test_i18ncmp expect output &&
1230 git config -f .gitmodules --remove-section submodule.subname
1233 test_expect_success
".git/config ignore=dirty doesn't suppress submodule summary" '
1234 git config --add -f .gitmodules submodule.subname.ignore none &&
1235 git config --add -f .gitmodules submodule.subname.path sm &&
1236 git config --add submodule.subname.ignore dirty &&
1237 git config --add submodule.subname.path sm &&
1238 git status >output &&
1239 test_i18ncmp expect output &&
1240 git config --remove-section submodule.subname &&
1241 git config -f .gitmodules --remove-section submodule.subname
1246 ; Changes to be committed:
1247 ; (use "git reset HEAD <file>..." to unstage)
1251 ; Changes not staged for commit:
1252 ; (use "git add <file>..." to update what will be committed)
1253 ; (use "git checkout -- <file>..." to discard changes in working directory)
1255 ; modified: dir1/modified
1256 ; modified: sm (new commits)
1258 ; Submodule changes to be committed:
1260 ; * sm $head...$new_head (1):
1263 ; Submodules changed but not updated:
1265 ; * sm $new_head...$head2 (1):
1269 ; (use "git add <file>..." to include in what will be committed)
1280 test_expect_success
"status (core.commentchar with submodule summary)" '
1281 test_config core.commentchar ";" &&
1282 git status >output &&
1283 test_i18ncmp expect output
1286 test_expect_success
"status (core.commentchar with two chars with submodule summary)" '
1287 test_config core.commentchar ";;" &&
1288 git status >output &&
1289 test_i18ncmp expect output
1294 # Changes not staged for commit:
1295 # (use "git add <file>..." to update what will be committed)
1296 # (use "git checkout -- <file>..." to discard changes in working directory)
1298 # modified: dir1/modified
1301 # (use "git add <file>..." to include in what will be committed)
1310 no changes added to commit (use "git add" and/or "git commit -a")
1313 test_expect_success
"--ignore-submodules=all suppresses submodule summary" '
1314 git status --ignore-submodules=all > output &&
1315 test_i18ncmp expect output
1318 test_expect_failure
'.gitmodules ignore=all suppresses submodule summary' '
1319 git config --add -f .gitmodules submodule.subname.ignore all &&
1320 git config --add -f .gitmodules submodule.subname.path sm &&
1321 git status > output &&
1322 test_cmp expect output &&
1323 git config -f .gitmodules --remove-section submodule.subname
1326 test_expect_failure
'.git/config ignore=all suppresses submodule summary' '
1327 git config --add -f .gitmodules submodule.subname.ignore none &&
1328 git config --add -f .gitmodules submodule.subname.path sm &&
1329 git config --add submodule.subname.ignore all &&
1330 git config --add submodule.subname.path sm &&
1331 git status > output &&
1332 test_cmp expect output &&
1333 git config --remove-section submodule.subname &&
1334 git config -f .gitmodules --remove-section submodule.subname