3 # Copyright (c) 2007 Johannes E. Schindelin
6 test_description
='git status'
9 *MINGW
*) GIT_TEST_CMP
="diff -uw";;
14 test_expect_success
'status -h in broken repository' '
16 test_when_finished "rm -fr broken" &&
20 echo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&
21 test_expect_code 129 git status -h >usage 2>&1
23 test_i18ngrep "[Uu]sage" broken/usage
26 test_expect_success
'commit -h in broken repository' '
28 test_when_finished "rm -fr broken" &&
32 echo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&
33 test_expect_code 129 git commit -h >usage 2>&1
35 test_i18ngrep "[Uu]sage" broken/usage
38 test_expect_success
'setup' '
52 git commit -m initial &&
56 echo 1 >dir1/modified &&
57 echo 2 >dir2/modified &&
62 test_expect_success
'status (1)' '
63 test_i18ngrep "use \"git rm --cached <file>\.\.\.\" to unstage" output
66 test_expect_success
'status --column' '
67 COLUMNS=50 git status --column="column dense" >output &&
70 # Changes to be committed:
71 # (use "git reset HEAD <file>..." to unstage)
73 # new file: dir2/added
75 # Changes not staged for commit:
76 # (use "git add <file>..." to update what will be committed)
77 # (use "git checkout -- <file>..." to discard changes in working directory)
79 # modified: dir1/modified
82 # (use "git add <file>..." to include in what will be committed)
84 # dir1/untracked dir2/untracked untracked
85 # dir2/modified output
87 test_i18ncmp expect output
92 # Changes to be committed:
93 # (use "git reset HEAD <file>..." to unstage)
95 # new file: dir2/added
97 # Changes not staged for commit:
98 # (use "git add <file>..." to update what will be committed)
99 # (use "git checkout -- <file>..." to discard changes in working directory)
101 # modified: dir1/modified
104 # (use "git add <file>..." to include in what will be committed)
114 test_expect_success
'status (2)' '
115 git status >output &&
116 test_i18ncmp expect output
121 # Changes to be committed:
122 # new file: dir2/added
124 # Changes not staged for commit:
125 # modified: dir1/modified
136 test_expect_success
'status (advice.statusHints false)' '
137 test_when_finished "git config --unset advice.statusHints" &&
138 git config advice.statusHints false &&
139 git status >output &&
140 test_i18ncmp expect output
155 test_expect_success
'status -s' '
157 git status -s >output &&
158 test_cmp expect output
162 test_expect_success
'status with gitignore' '
170 cat >expect <<-\EOF &&
175 git status -s >output &&
176 test_cmp expect output &&
178 cat >expect <<-\EOF &&
189 git status -s --ignored >output &&
190 test_cmp expect output &&
192 cat >expect <<-\EOF &&
194 # Changes to be committed:
195 # (use "git reset HEAD <file>..." to unstage)
197 # new file: dir2/added
199 # Changes not staged for commit:
200 # (use "git add <file>..." to update what will be committed)
201 # (use "git checkout -- <file>..." to discard changes in working directory)
203 # modified: dir1/modified
206 # (use "git add <file>..." to include in what will be committed)
210 # (use "git add -f <file>..." to include in what will be committed)
219 git status --ignored >output &&
220 test_i18ncmp expect output
223 test_expect_success
'status with gitignore (nothing untracked)' '
227 echo "dir2/modified" &&
232 cat >expect <<-\EOF &&
236 git status -s >output &&
237 test_cmp expect output &&
239 cat >expect <<-\EOF &&
250 git status -s --ignored >output &&
251 test_cmp expect output &&
253 cat >expect <<-\EOF &&
255 # Changes to be committed:
256 # (use "git reset HEAD <file>..." to unstage)
258 # new file: dir2/added
260 # Changes not staged for commit:
261 # (use "git add <file>..." to update what will be committed)
262 # (use "git checkout -- <file>..." to discard changes in working directory)
264 # modified: dir1/modified
267 # (use "git add -f <file>..." to include in what will be committed)
277 git status --ignored >output &&
278 test_i18ncmp expect output
295 test_expect_success
'status -s -b' '
297 git status -s -b >output &&
298 test_cmp expect output
302 test_expect_success
'status -s -z -b' '
303 tr "\\n" Q <expect >expect.q &&
304 mv expect.q expect &&
305 git status -s -z -b >output &&
306 nul_to_q <output >output.q &&
307 mv output.q output &&
308 test_cmp expect output
311 test_expect_success
'setup dir3' '
313 : >dir3/untracked1 &&
319 # Changes to be committed:
320 # (use "git reset HEAD <file>..." to unstage)
322 # new file: dir2/added
324 # Changes not staged for commit:
325 # (use "git add <file>..." to update what will be committed)
326 # (use "git checkout -- <file>..." to discard changes in working directory)
328 # modified: dir1/modified
330 # Untracked files not listed (use -u option to show untracked files)
332 test_expect_success
'status -uno' '
333 git status -uno >output &&
334 test_i18ncmp expect output
337 test_expect_success
'status (status.showUntrackedFiles no)' '
338 git config status.showuntrackedfiles no
339 test_when_finished "git config --unset status.showuntrackedfiles" &&
340 git status >output &&
341 test_i18ncmp expect output
346 # Changes to be committed:
347 # new file: dir2/added
349 # Changes not staged for commit:
350 # modified: dir1/modified
352 # Untracked files not listed
354 git config advice.statusHints false
355 test_expect_success
'status -uno (advice.statusHints false)' '
356 git status -uno >output &&
357 test_i18ncmp expect output
359 git config
--unset advice.statusHints
365 test_expect_success
'status -s -uno' '
366 git status -s -uno >output &&
367 test_cmp expect output
370 test_expect_success
'status -s (status.showUntrackedFiles no)' '
371 git config status.showuntrackedfiles no
372 git status -s >output &&
373 test_cmp expect output
378 # Changes to be committed:
379 # (use "git reset HEAD <file>..." to unstage)
381 # new file: dir2/added
383 # Changes not staged for commit:
384 # (use "git add <file>..." to update what will be committed)
385 # (use "git checkout -- <file>..." to discard changes in working directory)
387 # modified: dir1/modified
390 # (use "git add <file>..." to include in what will be committed)
400 test_expect_success
'status -unormal' '
401 git status -unormal >output &&
402 test_i18ncmp expect output
405 test_expect_success
'status (status.showUntrackedFiles normal)' '
406 git config status.showuntrackedfiles normal
407 test_when_finished "git config --unset status.showuntrackedfiles" &&
408 git status >output &&
409 test_i18ncmp expect output
423 test_expect_success
'status -s -unormal' '
424 git status -s -unormal >output &&
425 test_cmp expect output
428 test_expect_success
'status -s (status.showUntrackedFiles normal)' '
429 git config status.showuntrackedfiles normal
430 git status -s >output &&
431 test_cmp expect output
436 # Changes to be committed:
437 # (use "git reset HEAD <file>..." to unstage)
439 # new file: dir2/added
441 # Changes not staged for commit:
442 # (use "git add <file>..." to update what will be committed)
443 # (use "git checkout -- <file>..." to discard changes in working directory)
445 # modified: dir1/modified
448 # (use "git add <file>..." to include in what will be committed)
459 test_expect_success
'status -uall' '
460 git status -uall >output &&
461 test_i18ncmp expect output
464 test_expect_success
'status (status.showUntrackedFiles all)' '
465 git config status.showuntrackedfiles all
466 test_when_finished "git config --unset status.showuntrackedfiles" &&
467 git status >output &&
468 test_i18ncmp expect output
471 test_expect_success
'teardown dir3' '
485 test_expect_success
'status -s -uall' '
486 git config --unset status.showuntrackedfiles
487 git status -s -uall >output &&
488 test_cmp expect output
490 test_expect_success
'status -s (status.showUntrackedFiles all)' '
491 git config status.showuntrackedfiles all
492 git status -s >output &&
494 git config --unset status.showuntrackedfiles &&
495 test_cmp expect output
500 # Changes to be committed:
501 # (use "git reset HEAD <file>..." to unstage)
503 # new file: ../dir2/added
505 # Changes not staged for commit:
506 # (use "git add <file>..." to update what will be committed)
507 # (use "git checkout -- <file>..." to discard changes in working directory)
512 # (use "git add <file>..." to include in what will be committed)
522 test_expect_success
'status with relative paths' '
523 (cd dir1 && git status) >output &&
524 test_i18ncmp expect output
537 test_expect_success
'status -s with relative paths' '
539 (cd dir1 && git status -s) >output &&
540 test_cmp expect output
555 test_expect_success
'status --porcelain ignores relative paths setting' '
557 (cd dir1 && git status --porcelain) >output &&
558 test_cmp expect output
562 test_expect_success
'setup unique colors' '
564 git config status.color.untracked blue &&
565 git config status.color.branch green
570 # On branch <GREEN>master<RESET>
571 # Changes to be committed:
572 # (use "git reset HEAD <file>..." to unstage)
574 # <GREEN>new file: dir2/added<RESET>
576 # Changes not staged for commit:
577 # (use "git add <file>..." to update what will be committed)
578 # (use "git checkout -- <file>..." to discard changes in working directory)
580 # <RED>modified: dir1/modified<RESET>
583 # (use "git add <file>..." to include in what will be committed)
585 # <BLUE>dir1/untracked<RESET>
586 # <BLUE>dir2/modified<RESET>
587 # <BLUE>dir2/untracked<RESET>
588 # <BLUE>expect<RESET>
589 # <BLUE>output<RESET>
590 # <BLUE>untracked<RESET>
593 test_expect_success
'status with color.ui' '
594 git config color.ui always &&
595 test_when_finished "git config --unset color.ui" &&
596 git status | test_decode_color >output &&
597 test_i18ncmp expect output
600 test_expect_success
'status with color.status' '
601 git config color.status always &&
602 test_when_finished "git config --unset color.status" &&
603 git status | test_decode_color >output &&
604 test_i18ncmp expect output
608 <RED
>M
<RESET
> dir
1/modified
609 <GREEN
>A
<RESET
> dir
2/added
610 <BLUE
>??
<RESET
> dir
1/untracked
611 <BLUE
>??
<RESET
> dir
2/modified
612 <BLUE
>??
<RESET
> dir
2/untracked
613 <BLUE
>??
<RESET
> expect
614 <BLUE
>??
<RESET
> output
615 <BLUE
>??
<RESET
> untracked
618 test_expect_success
'status -s with color.ui' '
620 git config color.ui always &&
621 git status -s | test_decode_color >output &&
622 test_cmp expect output
626 test_expect_success
'status -s with color.status' '
628 git config --unset color.ui &&
629 git config color.status always &&
630 git status -s | test_decode_color >output &&
631 test_cmp expect output
636 ## <GREEN>master<RESET>
637 <RED
>M
<RESET
> dir
1/modified
638 <GREEN
>A
<RESET
> dir
2/added
639 <BLUE
>??
<RESET
> dir
1/untracked
640 <BLUE
>??
<RESET
> dir
2/modified
641 <BLUE
>??
<RESET
> dir
2/untracked
642 <BLUE
>??
<RESET
> expect
643 <BLUE
>??
<RESET
> output
644 <BLUE
>??
<RESET
> untracked
647 test_expect_success
'status -s -b with color.status' '
649 git status -s -b | test_decode_color >output &&
650 test_cmp expect output
665 test_expect_success
'status --porcelain ignores color.ui' '
667 git config --unset color.status &&
668 git config color.ui always &&
669 git status --porcelain | test_decode_color >output &&
670 test_cmp expect output
674 test_expect_success
'status --porcelain ignores color.status' '
676 git config --unset color.ui &&
677 git config color.status always &&
678 git status --porcelain | test_decode_color >output &&
679 test_cmp expect output
683 # recover unconditionally from color tests
684 git config
--unset color.status
685 git config
--unset color.ui
687 test_expect_success
'status --porcelain respects -b' '
689 git status --porcelain -b >output &&
695 test_cmp expect output
701 # Changes to be committed:
702 # (use "git reset HEAD <file>..." to unstage)
704 # new file: dir2/added
706 # Changes not staged for commit:
707 # (use "git add <file>..." to update what will be committed)
708 # (use "git checkout -- <file>..." to discard changes in working directory)
710 # modified: dir1/modified
713 # (use "git add <file>..." to include in what will be committed)
724 test_expect_success
'status without relative paths' '
726 git config status.relativePaths false &&
727 test_when_finished "git config --unset status.relativePaths" &&
728 (cd dir1 && git status) >output &&
729 test_i18ncmp expect output
744 test_expect_success
'status -s without relative paths' '
746 git config status.relativePaths false &&
747 test_when_finished "git config --unset status.relativePaths" &&
748 (cd dir1 && git status -s) >output &&
749 test_cmp expect output
755 # Changes to be committed:
756 # (use "git reset HEAD <file>..." to unstage)
758 # modified: dir1/modified
761 # (use "git add <file>..." to include in what will be committed)
769 test_expect_success
'dry-run of partial commit excluding new file in index' '
770 git commit --dry-run dir1/modified >output &&
771 test_i18ncmp expect output
775 :100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M dir1/modified
777 test_expect_success
'status refreshes the index' '
780 git diff-files >output &&
781 test_cmp expect output
784 test_expect_success
'setup status submodule summary' '
785 test_create_repo sm && (
789 git commit -m "Add foo"
796 # Changes to be committed:
797 # (use "git reset HEAD <file>..." to unstage)
799 # new file: dir2/added
802 # Changes not staged for commit:
803 # (use "git add <file>..." to update what will be committed)
804 # (use "git checkout -- <file>..." to discard changes in working directory)
806 # modified: dir1/modified
809 # (use "git add <file>..." to include in what will be committed)
818 test_expect_success
'status submodule summary is disabled by default' '
819 git status >output &&
820 test_i18ncmp expect output
823 # we expect the same as the previous test
824 test_expect_success
'status --untracked-files=all does not show submodule' '
825 git status --untracked-files=all >output &&
826 test_i18ncmp expect output
840 test_expect_success
'status -s submodule summary is disabled by default' '
841 git status -s >output &&
842 test_cmp expect output
845 # we expect the same as the previous test
846 test_expect_success
'status -s --untracked-files=all does not show submodule' '
847 git status -s --untracked-files=all >output &&
848 test_cmp expect output
851 head=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
855 # Changes to be committed:
856 # (use "git reset HEAD <file>..." to unstage)
858 # new file: dir2/added
861 # Changes not staged for commit:
862 # (use "git add <file>..." to update what will be committed)
863 # (use "git checkout -- <file>..." to discard changes in working directory)
865 # modified: dir1/modified
867 # Submodule changes to be committed:
869 # * sm 0000000...$head (1):
873 # (use "git add <file>..." to include in what will be committed)
882 test_expect_success
'status submodule summary' '
883 git config status.submodulesummary 10 &&
884 git status >output &&
885 test_i18ncmp expect output
899 test_expect_success
'status -s submodule summary' '
900 git status -s >output &&
901 test_cmp expect output
906 # Changes not staged for commit:
907 # (use "git add <file>..." to update what will be committed)
908 # (use "git checkout -- <file>..." to discard changes in working directory)
910 # modified: dir1/modified
913 # (use "git add <file>..." to include in what will be committed)
921 no changes added to commit (use "git add" and/or "git commit -a")
923 test_expect_success
'status submodule summary (clean submodule): commit' '
924 git commit -m "commit submodule" &&
925 git config status.submodulesummary 10 &&
926 test_must_fail git commit --dry-run >output &&
927 test_i18ncmp expect output &&
928 git status >output &&
929 test_i18ncmp expect output
941 test_expect_success
'status -s submodule summary (clean submodule)' '
942 git status -s >output &&
943 test_cmp expect output
946 test_expect_success
'status -z implies porcelain' '
947 git status --porcelain |
948 "$PERL_PATH" -pe "s/\012/\000/g" >expect &&
949 git status -z >output &&
950 test_cmp expect output
955 # Changes to be committed:
956 # (use "git reset HEAD^1 <file>..." to unstage)
958 # new file: dir2/added
961 # Changes not staged for commit:
962 # (use "git add <file>..." to update what will be committed)
963 # (use "git checkout -- <file>..." to discard changes in working directory)
965 # modified: dir1/modified
967 # Submodule changes to be committed:
969 # * sm 0000000...$head (1):
973 # (use "git add <file>..." to include in what will be committed)
982 test_expect_success
'commit --dry-run submodule summary (--amend)' '
983 git config status.submodulesummary 10 &&
984 git commit --dry-run --amend >output &&
985 test_i18ncmp expect output
988 test_expect_success POSIXPERM
,SANITY
'status succeeds in a read-only repository' '
991 # make dir1/tracked stat-dirty
992 >dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked &&
993 git status -s >output &&
994 ! grep dir1/tracked output &&
995 # make sure "status" succeeded without writing index out
996 git diff-files | grep dir1/tracked
1003 (cd sm
&& echo > bar
&& git add bar
&& git commit
-q -m 'Add bar') && git add sm
1004 new_head
=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
1009 # Changes to be committed:
1010 # (use "git reset HEAD <file>..." to unstage)
1014 # Changes not staged for commit:
1015 # (use "git add <file>..." to update what will be committed)
1016 # (use "git checkout -- <file>..." to discard changes in working directory)
1018 # modified: dir1/modified
1020 # Submodule changes to be committed:
1022 # * sm $head...$new_head (1):
1026 # (use "git add <file>..." to include in what will be committed)
1037 test_expect_success
'--ignore-submodules=untracked suppresses submodules with untracked content' '
1038 echo modified sm/untracked &&
1039 git status --ignore-submodules=untracked >output &&
1040 test_i18ncmp expect output
1043 test_expect_success
'.gitmodules ignore=untracked suppresses submodules with untracked content' '
1044 git config diff.ignoreSubmodules dirty &&
1045 git status >output &&
1046 test_i18ncmp expect output &&
1047 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1048 git config --add -f .gitmodules submodule.subname.path sm &&
1049 git status >output &&
1050 test_i18ncmp expect output &&
1051 git config -f .gitmodules --remove-section submodule.subname &&
1052 git config --unset diff.ignoreSubmodules
1055 test_expect_success
'.git/config ignore=untracked suppresses submodules with untracked content' '
1056 git config --add -f .gitmodules submodule.subname.ignore none &&
1057 git config --add -f .gitmodules submodule.subname.path sm &&
1058 git config --add submodule.subname.ignore untracked &&
1059 git config --add submodule.subname.path sm &&
1060 git status >output &&
1061 test_i18ncmp expect output &&
1062 git config --remove-section submodule.subname &&
1063 git config --remove-section -f .gitmodules submodule.subname
1066 test_expect_success
'--ignore-submodules=dirty suppresses submodules with untracked content' '
1067 git status --ignore-submodules=dirty >output &&
1068 test_i18ncmp expect output
1071 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with untracked content' '
1072 git config diff.ignoreSubmodules dirty &&
1073 git status >output &&
1075 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1076 git config --add -f .gitmodules submodule.subname.path sm &&
1077 git status >output &&
1078 test_i18ncmp expect output &&
1079 git config -f .gitmodules --remove-section submodule.subname &&
1080 git config --unset diff.ignoreSubmodules
1083 test_expect_success
'.git/config ignore=dirty suppresses submodules with untracked content' '
1084 git config --add -f .gitmodules submodule.subname.ignore none &&
1085 git config --add -f .gitmodules submodule.subname.path sm &&
1086 git config --add submodule.subname.ignore dirty &&
1087 git config --add submodule.subname.path sm &&
1088 git status >output &&
1089 test_i18ncmp expect output &&
1090 git config --remove-section submodule.subname &&
1091 git config -f .gitmodules --remove-section submodule.subname
1094 test_expect_success
'--ignore-submodules=dirty suppresses submodules with modified content' '
1095 echo modified >sm/foo &&
1096 git status --ignore-submodules=dirty >output &&
1097 test_i18ncmp expect output
1100 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with modified content' '
1101 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1102 git config --add -f .gitmodules submodule.subname.path sm &&
1103 git status >output &&
1104 test_i18ncmp expect output &&
1105 git config -f .gitmodules --remove-section submodule.subname
1108 test_expect_success
'.git/config ignore=dirty suppresses submodules with modified content' '
1109 git config --add -f .gitmodules submodule.subname.ignore none &&
1110 git config --add -f .gitmodules submodule.subname.path sm &&
1111 git config --add submodule.subname.ignore dirty &&
1112 git config --add submodule.subname.path sm &&
1113 git status >output &&
1114 test_i18ncmp expect output &&
1115 git config --remove-section submodule.subname &&
1116 git config -f .gitmodules --remove-section submodule.subname
1121 # Changes to be committed:
1122 # (use "git reset HEAD <file>..." to unstage)
1126 # Changes not staged for commit:
1127 # (use "git add <file>..." to update what will be committed)
1128 # (use "git checkout -- <file>..." to discard changes in working directory)
1129 # (commit or discard the untracked or modified content in submodules)
1131 # modified: dir1/modified
1132 # modified: sm (modified content)
1134 # Submodule changes to be committed:
1136 # * sm $head...$new_head (1):
1140 # (use "git add <file>..." to include in what will be committed)
1151 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodules with modified content" '
1152 git status --ignore-submodules=untracked > output &&
1153 test_i18ncmp expect output
1156 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
1157 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1158 git config --add -f .gitmodules submodule.subname.path sm &&
1159 git status >output &&
1160 test_i18ncmp expect output &&
1161 git config -f .gitmodules --remove-section submodule.subname
1164 test_expect_success
".git/config ignore=untracked doesn't suppress submodules with modified content" '
1165 git config --add -f .gitmodules submodule.subname.ignore none &&
1166 git config --add -f .gitmodules submodule.subname.path sm &&
1167 git config --add submodule.subname.ignore untracked &&
1168 git config --add submodule.subname.path sm &&
1169 git status >output &&
1170 test_i18ncmp expect output &&
1171 git config --remove-section submodule.subname &&
1172 git config -f .gitmodules --remove-section submodule.subname
1175 head2
=$
(cd sm
&& git commit
-q -m "2nd commit" foo
&& git rev-parse
--short=7 --verify HEAD
)
1179 # Changes to be committed:
1180 # (use "git reset HEAD <file>..." to unstage)
1184 # Changes not staged for commit:
1185 # (use "git add <file>..." to update what will be committed)
1186 # (use "git checkout -- <file>..." to discard changes in working directory)
1188 # modified: dir1/modified
1189 # modified: sm (new commits)
1191 # Submodule changes to be committed:
1193 # * sm $head...$new_head (1):
1196 # Submodules changed but not updated:
1198 # * sm $new_head...$head2 (1):
1202 # (use "git add <file>..." to include in what will be committed)
1213 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodule summary" '
1214 git status --ignore-submodules=untracked > output &&
1215 test_i18ncmp expect output
1218 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodule summary" '
1219 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1220 git config --add -f .gitmodules submodule.subname.path sm &&
1221 git status >output &&
1222 test_i18ncmp expect output &&
1223 git config -f .gitmodules --remove-section submodule.subname
1226 test_expect_success
".git/config ignore=untracked doesn't suppress submodule summary" '
1227 git config --add -f .gitmodules submodule.subname.ignore none &&
1228 git config --add -f .gitmodules submodule.subname.path sm &&
1229 git config --add submodule.subname.ignore untracked &&
1230 git config --add submodule.subname.path sm &&
1231 git status >output &&
1232 test_i18ncmp expect output &&
1233 git config --remove-section submodule.subname &&
1234 git config -f .gitmodules --remove-section submodule.subname
1237 test_expect_success
"--ignore-submodules=dirty doesn't suppress submodule summary" '
1238 git status --ignore-submodules=dirty > output &&
1239 test_i18ncmp expect output
1241 test_expect_success
".gitmodules ignore=dirty doesn't suppress submodule summary" '
1242 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1243 git config --add -f .gitmodules submodule.subname.path sm &&
1244 git status >output &&
1245 test_i18ncmp expect output &&
1246 git config -f .gitmodules --remove-section submodule.subname
1249 test_expect_success
".git/config ignore=dirty doesn't suppress submodule summary" '
1250 git config --add -f .gitmodules submodule.subname.ignore none &&
1251 git config --add -f .gitmodules submodule.subname.path sm &&
1252 git config --add submodule.subname.ignore dirty &&
1253 git config --add submodule.subname.path sm &&
1254 git status >output &&
1255 test_i18ncmp expect output &&
1256 git config --remove-section submodule.subname &&
1257 git config -f .gitmodules --remove-section submodule.subname
1262 # Changes not staged for commit:
1263 # (use "git add <file>..." to update what will be committed)
1264 # (use "git checkout -- <file>..." to discard changes in working directory)
1266 # modified: dir1/modified
1269 # (use "git add <file>..." to include in what will be committed)
1278 no changes added to commit (use "git add" and/or "git commit -a")
1281 test_expect_success
"--ignore-submodules=all suppresses submodule summary" '
1282 git status --ignore-submodules=all > output &&
1283 test_i18ncmp expect output
1286 test_expect_failure
'.gitmodules ignore=all suppresses submodule summary' '
1287 git config --add -f .gitmodules submodule.subname.ignore all &&
1288 git config --add -f .gitmodules submodule.subname.path sm &&
1289 git status > output &&
1290 test_cmp expect output &&
1291 git config -f .gitmodules --remove-section submodule.subname
1294 test_expect_failure
'.git/config ignore=all suppresses submodule summary' '
1295 git config --add -f .gitmodules submodule.subname.ignore none &&
1296 git config --add -f .gitmodules submodule.subname.path sm &&
1297 git config --add submodule.subname.ignore all &&
1298 git config --add submodule.subname.path sm &&
1299 git status > output &&
1300 test_cmp expect output &&
1301 git config --remove-section submodule.subname &&
1302 git config -f .gitmodules --remove-section submodule.subname