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_cmp 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_when_finished "git config --unset advice.statusHints" &&
134 git config advice.statusHints false &&
135 git status >output &&
136 test_i18ncmp expect output
151 test_expect_success
'status -s' '
153 git status -s >output &&
154 test_cmp expect output
158 test_expect_success
'status with gitignore' '
166 cat >expect <<-\EOF &&
171 git status -s >output &&
172 test_cmp expect output &&
174 cat >expect <<-\EOF &&
185 git status -s --ignored >output &&
186 test_cmp expect output &&
188 cat >expect <<-\EOF &&
190 # Changes to be committed:
191 # (use "git reset HEAD <file>..." to unstage)
193 # new file: dir2/added
195 # Changes not staged for commit:
196 # (use "git add <file>..." to update what will be committed)
197 # (use "git checkout -- <file>..." to discard changes in working directory)
199 # modified: dir1/modified
202 # (use "git add <file>..." to include in what will be committed)
206 # (use "git add -f <file>..." to include in what will be committed)
215 git status --ignored >output &&
216 test_i18ncmp expect output
219 test_expect_success
'status with gitignore (nothing untracked)' '
223 echo "dir2/modified" &&
228 cat >expect <<-\EOF &&
232 git status -s >output &&
233 test_cmp expect output &&
235 cat >expect <<-\EOF &&
246 git status -s --ignored >output &&
247 test_cmp expect output &&
249 cat >expect <<-\EOF &&
251 # Changes to be committed:
252 # (use "git reset HEAD <file>..." to unstage)
254 # new file: dir2/added
256 # Changes not staged for commit:
257 # (use "git add <file>..." to update what will be committed)
258 # (use "git checkout -- <file>..." to discard changes in working directory)
260 # modified: dir1/modified
263 # (use "git add -f <file>..." to include in what will be committed)
273 git status --ignored >output &&
274 test_i18ncmp expect output
291 test_expect_success
'status -s -b' '
293 git status -s -b >output &&
294 test_cmp expect output
298 test_expect_success
'setup dir3' '
300 : >dir3/untracked1 &&
306 # Changes to be committed:
307 # (use "git reset HEAD <file>..." to unstage)
309 # new file: dir2/added
311 # Changes not staged for commit:
312 # (use "git add <file>..." to update what will be committed)
313 # (use "git checkout -- <file>..." to discard changes in working directory)
315 # modified: dir1/modified
317 # Untracked files not listed (use -u option to show untracked files)
319 test_expect_success
'status -uno' '
320 git status -uno >output &&
321 test_i18ncmp expect output
324 test_expect_success
'status (status.showUntrackedFiles no)' '
325 git config status.showuntrackedfiles no
326 test_when_finished "git config --unset status.showuntrackedfiles" &&
327 git status >output &&
328 test_i18ncmp expect output
333 # Changes to be committed:
334 # new file: dir2/added
336 # Changes not staged for commit:
337 # modified: dir1/modified
339 # Untracked files not listed
341 git config advice.statusHints false
342 test_expect_success
'status -uno (advice.statusHints false)' '
343 git status -uno >output &&
344 test_i18ncmp expect output
346 git config
--unset advice.statusHints
352 test_expect_success
'status -s -uno' '
353 git status -s -uno >output &&
354 test_cmp expect output
357 test_expect_success
'status -s (status.showUntrackedFiles no)' '
358 git config status.showuntrackedfiles no
359 git status -s >output &&
360 test_cmp expect output
365 # Changes to be committed:
366 # (use "git reset HEAD <file>..." to unstage)
368 # new file: dir2/added
370 # Changes not staged for commit:
371 # (use "git add <file>..." to update what will be committed)
372 # (use "git checkout -- <file>..." to discard changes in working directory)
374 # modified: dir1/modified
377 # (use "git add <file>..." to include in what will be committed)
387 test_expect_success
'status -unormal' '
388 git status -unormal >output &&
389 test_i18ncmp expect output
392 test_expect_success
'status (status.showUntrackedFiles normal)' '
393 git config status.showuntrackedfiles normal
394 test_when_finished "git config --unset status.showuntrackedfiles" &&
395 git status >output &&
396 test_i18ncmp expect output
410 test_expect_success
'status -s -unormal' '
411 git status -s -unormal >output &&
412 test_cmp expect output
415 test_expect_success
'status -s (status.showUntrackedFiles normal)' '
416 git config status.showuntrackedfiles normal
417 git status -s >output &&
418 test_cmp expect output
423 # Changes to be committed:
424 # (use "git reset HEAD <file>..." to unstage)
426 # new file: dir2/added
428 # Changes not staged for commit:
429 # (use "git add <file>..." to update what will be committed)
430 # (use "git checkout -- <file>..." to discard changes in working directory)
432 # modified: dir1/modified
435 # (use "git add <file>..." to include in what will be committed)
446 test_expect_success
'status -uall' '
447 git status -uall >output &&
448 test_i18ncmp expect output
451 test_expect_success
'status (status.showUntrackedFiles all)' '
452 git config status.showuntrackedfiles all
453 test_when_finished "git config --unset status.showuntrackedfiles" &&
454 git status >output &&
455 test_i18ncmp expect output
458 test_expect_success
'teardown dir3' '
472 test_expect_success
'status -s -uall' '
473 git config --unset status.showuntrackedfiles
474 git status -s -uall >output &&
475 test_cmp expect output
477 test_expect_success
'status -s (status.showUntrackedFiles all)' '
478 git config status.showuntrackedfiles all
479 git status -s >output &&
481 git config --unset status.showuntrackedfiles &&
482 test_cmp expect output
487 # Changes to be committed:
488 # (use "git reset HEAD <file>..." to unstage)
490 # new file: ../dir2/added
492 # Changes not staged for commit:
493 # (use "git add <file>..." to update what will be committed)
494 # (use "git checkout -- <file>..." to discard changes in working directory)
499 # (use "git add <file>..." to include in what will be committed)
509 test_expect_success
'status with relative paths' '
510 (cd dir1 && git status) >output &&
511 test_i18ncmp expect output
524 test_expect_success
'status -s with relative paths' '
526 (cd dir1 && git status -s) >output &&
527 test_cmp expect output
542 test_expect_success
'status --porcelain ignores relative paths setting' '
544 (cd dir1 && git status --porcelain) >output &&
545 test_cmp expect output
549 test_expect_success
'setup unique colors' '
551 git config status.color.untracked blue &&
552 git config status.color.branch green
557 # On branch <GREEN>master<RESET>
558 # Changes to be committed:
559 # (use "git reset HEAD <file>..." to unstage)
561 # <GREEN>new file: dir2/added<RESET>
563 # Changes not staged for commit:
564 # (use "git add <file>..." to update what will be committed)
565 # (use "git checkout -- <file>..." to discard changes in working directory)
567 # <RED>modified: dir1/modified<RESET>
570 # (use "git add <file>..." to include in what will be committed)
572 # <BLUE>dir1/untracked<RESET>
573 # <BLUE>dir2/modified<RESET>
574 # <BLUE>dir2/untracked<RESET>
575 # <BLUE>expect<RESET>
576 # <BLUE>output<RESET>
577 # <BLUE>untracked<RESET>
580 test_expect_success
'status with color.ui' '
581 git config color.ui always &&
582 test_when_finished "git config --unset color.ui" &&
583 git status | test_decode_color >output &&
584 test_i18ncmp expect output
587 test_expect_success
'status with color.status' '
588 git config color.status always &&
589 test_when_finished "git config --unset color.status" &&
590 git status | test_decode_color >output &&
591 test_i18ncmp expect output
595 <RED
>M
<RESET
> dir
1/modified
596 <GREEN
>A
<RESET
> dir
2/added
597 <BLUE
>??
<RESET
> dir
1/untracked
598 <BLUE
>??
<RESET
> dir
2/modified
599 <BLUE
>??
<RESET
> dir
2/untracked
600 <BLUE
>??
<RESET
> expect
601 <BLUE
>??
<RESET
> output
602 <BLUE
>??
<RESET
> untracked
605 test_expect_success
'status -s with color.ui' '
607 git config color.ui always &&
608 git status -s | test_decode_color >output &&
609 test_cmp expect output
613 test_expect_success
'status -s with color.status' '
615 git config --unset color.ui &&
616 git config color.status always &&
617 git status -s | test_decode_color >output &&
618 test_cmp expect output
623 ## <GREEN>master<RESET>
624 <RED
>M
<RESET
> dir
1/modified
625 <GREEN
>A
<RESET
> dir
2/added
626 <BLUE
>??
<RESET
> dir
1/untracked
627 <BLUE
>??
<RESET
> dir
2/modified
628 <BLUE
>??
<RESET
> dir
2/untracked
629 <BLUE
>??
<RESET
> expect
630 <BLUE
>??
<RESET
> output
631 <BLUE
>??
<RESET
> untracked
634 test_expect_success
'status -s -b with color.status' '
636 git status -s -b | test_decode_color >output &&
637 test_cmp expect output
652 test_expect_success
'status --porcelain ignores color.ui' '
654 git config --unset color.status &&
655 git config color.ui always &&
656 git status --porcelain | test_decode_color >output &&
657 test_cmp expect output
661 test_expect_success
'status --porcelain ignores color.status' '
663 git config --unset color.ui &&
664 git config color.status always &&
665 git status --porcelain | test_decode_color >output &&
666 test_cmp expect output
670 # recover unconditionally from color tests
671 git config
--unset color.status
672 git config
--unset color.ui
674 test_expect_success
'status --porcelain ignores -b' '
676 git status --porcelain -b >output &&
677 test_cmp expect output
683 # Changes to be committed:
684 # (use "git reset HEAD <file>..." to unstage)
686 # new file: dir2/added
688 # Changes not staged for commit:
689 # (use "git add <file>..." to update what will be committed)
690 # (use "git checkout -- <file>..." to discard changes in working directory)
692 # modified: dir1/modified
695 # (use "git add <file>..." to include in what will be committed)
706 test_expect_success
'status without relative paths' '
708 git config status.relativePaths false &&
709 test_when_finished "git config --unset status.relativePaths" &&
710 (cd dir1 && git status) >output &&
711 test_i18ncmp expect output
726 test_expect_success
'status -s without relative paths' '
728 git config status.relativePaths false &&
729 test_when_finished "git config --unset status.relativePaths" &&
730 (cd dir1 && git status -s) >output &&
731 test_cmp expect output
737 # Changes to be committed:
738 # (use "git reset HEAD <file>..." to unstage)
740 # modified: dir1/modified
743 # (use "git add <file>..." to include in what will be committed)
751 test_expect_success
'dry-run of partial commit excluding new file in index' '
752 git commit --dry-run dir1/modified >output &&
753 test_i18ncmp expect output
757 :100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M dir1/modified
759 test_expect_success
'status refreshes the index' '
762 git diff-files >output &&
763 test_cmp expect output
766 test_expect_success
'setup status submodule summary' '
767 test_create_repo sm && (
771 git commit -m "Add foo"
778 # Changes to be committed:
779 # (use "git reset HEAD <file>..." to unstage)
781 # new file: dir2/added
784 # Changes not staged for commit:
785 # (use "git add <file>..." to update what will be committed)
786 # (use "git checkout -- <file>..." to discard changes in working directory)
788 # modified: dir1/modified
791 # (use "git add <file>..." to include in what will be committed)
800 test_expect_success
'status submodule summary is disabled by default' '
801 git status >output &&
802 test_i18ncmp expect output
805 # we expect the same as the previous test
806 test_expect_success
'status --untracked-files=all does not show submodule' '
807 git status --untracked-files=all >output &&
808 test_i18ncmp expect output
822 test_expect_success
'status -s submodule summary is disabled by default' '
823 git status -s >output &&
824 test_cmp expect output
827 # we expect the same as the previous test
828 test_expect_success
'status -s --untracked-files=all does not show submodule' '
829 git status -s --untracked-files=all >output &&
830 test_cmp expect output
833 head=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
837 # Changes to be committed:
838 # (use "git reset HEAD <file>..." to unstage)
840 # new file: dir2/added
843 # Changes not staged for commit:
844 # (use "git add <file>..." to update what will be committed)
845 # (use "git checkout -- <file>..." to discard changes in working directory)
847 # modified: dir1/modified
849 # Submodule changes to be committed:
851 # * sm 0000000...$head (1):
855 # (use "git add <file>..." to include in what will be committed)
864 test_expect_success
'status submodule summary' '
865 git config status.submodulesummary 10 &&
866 git status >output &&
867 test_i18ncmp expect output
881 test_expect_success
'status -s submodule summary' '
882 git status -s >output &&
883 test_cmp expect output
888 # Changes not staged for commit:
889 # (use "git add <file>..." to update what will be committed)
890 # (use "git checkout -- <file>..." to discard changes in working directory)
892 # modified: dir1/modified
895 # (use "git add <file>..." to include in what will be committed)
903 no changes added to commit (use "git add" and/or "git commit -a")
905 test_expect_success
'status submodule summary (clean submodule): commit' '
906 git commit -m "commit submodule" &&
907 git config status.submodulesummary 10 &&
908 test_must_fail git commit --dry-run >output &&
909 test_i18ncmp expect output &&
910 git status >output &&
911 test_i18ncmp expect output
923 test_expect_success
'status -s submodule summary (clean submodule)' '
924 git status -s >output &&
925 test_cmp expect output
928 test_expect_success
'status -z implies porcelain' '
929 git status --porcelain |
930 perl -pe "s/\012/\000/g" >expect &&
931 git status -z >output &&
932 test_cmp expect output
937 # Changes to be committed:
938 # (use "git reset HEAD^1 <file>..." to unstage)
940 # new file: dir2/added
943 # Changes not staged for commit:
944 # (use "git add <file>..." to update what will be committed)
945 # (use "git checkout -- <file>..." to discard changes in working directory)
947 # modified: dir1/modified
949 # Submodule changes to be committed:
951 # * sm 0000000...$head (1):
955 # (use "git add <file>..." to include in what will be committed)
964 test_expect_success
'commit --dry-run submodule summary (--amend)' '
965 git config status.submodulesummary 10 &&
966 git commit --dry-run --amend >output &&
967 test_i18ncmp expect output
970 test_expect_success POSIXPERM
,SANITY
'status succeeds in a read-only repository' '
973 # make dir1/tracked stat-dirty
974 >dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked &&
975 git status -s >output &&
976 ! grep dir1/tracked output &&
977 # make sure "status" succeeded without writing index out
978 git diff-files | grep dir1/tracked
985 (cd sm
&& echo > bar
&& git add bar
&& git commit
-q -m 'Add bar') && git add sm
986 new_head
=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
991 # Changes to be committed:
992 # (use "git reset HEAD <file>..." to unstage)
996 # Changes not staged for commit:
997 # (use "git add <file>..." to update what will be committed)
998 # (use "git checkout -- <file>..." to discard changes in working directory)
1000 # modified: dir1/modified
1002 # Submodule changes to be committed:
1004 # * sm $head...$new_head (1):
1008 # (use "git add <file>..." to include in what will be committed)
1019 test_expect_success
'--ignore-submodules=untracked suppresses submodules with untracked content' '
1020 echo modified sm/untracked &&
1021 git status --ignore-submodules=untracked >output &&
1022 test_i18ncmp expect output
1025 test_expect_success
'.gitmodules ignore=untracked suppresses submodules with untracked content' '
1026 git config diff.ignoreSubmodules dirty &&
1027 git status >output &&
1028 test_i18ncmp expect output &&
1029 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1030 git config --add -f .gitmodules submodule.subname.path sm &&
1031 git status >output &&
1032 test_i18ncmp expect output &&
1033 git config -f .gitmodules --remove-section submodule.subname &&
1034 git config --unset diff.ignoreSubmodules
1037 test_expect_success
'.git/config ignore=untracked suppresses submodules with untracked content' '
1038 git config --add -f .gitmodules submodule.subname.ignore none &&
1039 git config --add -f .gitmodules submodule.subname.path sm &&
1040 git config --add submodule.subname.ignore untracked &&
1041 git config --add submodule.subname.path sm &&
1042 git status >output &&
1043 test_i18ncmp expect output &&
1044 git config --remove-section submodule.subname &&
1045 git config --remove-section -f .gitmodules submodule.subname
1048 test_expect_success
'--ignore-submodules=dirty suppresses submodules with untracked content' '
1049 git status --ignore-submodules=dirty >output &&
1050 test_i18ncmp expect output
1053 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with untracked content' '
1054 git config diff.ignoreSubmodules dirty &&
1055 git status >output &&
1057 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1058 git config --add -f .gitmodules submodule.subname.path sm &&
1059 git status >output &&
1060 test_i18ncmp expect output &&
1061 git config -f .gitmodules --remove-section submodule.subname &&
1062 git config --unset diff.ignoreSubmodules
1065 test_expect_success
'.git/config ignore=dirty suppresses submodules with untracked content' '
1066 git config --add -f .gitmodules submodule.subname.ignore none &&
1067 git config --add -f .gitmodules submodule.subname.path sm &&
1068 git config --add submodule.subname.ignore dirty &&
1069 git config --add submodule.subname.path sm &&
1070 git status >output &&
1071 test_i18ncmp expect output &&
1072 git config --remove-section submodule.subname &&
1073 git config -f .gitmodules --remove-section submodule.subname
1076 test_expect_success
'--ignore-submodules=dirty suppresses submodules with modified content' '
1077 echo modified >sm/foo &&
1078 git status --ignore-submodules=dirty >output &&
1079 test_i18ncmp expect output
1082 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with modified content' '
1083 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1084 git config --add -f .gitmodules submodule.subname.path sm &&
1085 git status >output &&
1086 test_i18ncmp expect output &&
1087 git config -f .gitmodules --remove-section submodule.subname
1090 test_expect_success
'.git/config ignore=dirty suppresses submodules with modified content' '
1091 git config --add -f .gitmodules submodule.subname.ignore none &&
1092 git config --add -f .gitmodules submodule.subname.path sm &&
1093 git config --add submodule.subname.ignore dirty &&
1094 git config --add submodule.subname.path sm &&
1095 git status >output &&
1096 test_i18ncmp expect output &&
1097 git config --remove-section submodule.subname &&
1098 git config -f .gitmodules --remove-section submodule.subname
1103 # Changes to be committed:
1104 # (use "git reset HEAD <file>..." to unstage)
1108 # Changes not staged for commit:
1109 # (use "git add <file>..." to update what will be committed)
1110 # (use "git checkout -- <file>..." to discard changes in working directory)
1111 # (commit or discard the untracked or modified content in submodules)
1113 # modified: dir1/modified
1114 # modified: sm (modified content)
1116 # Submodule changes to be committed:
1118 # * sm $head...$new_head (1):
1122 # (use "git add <file>..." to include in what will be committed)
1133 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodules with modified content" '
1134 git status --ignore-submodules=untracked > output &&
1135 test_i18ncmp expect output
1138 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
1139 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1140 git config --add -f .gitmodules submodule.subname.path sm &&
1141 git status >output &&
1142 test_i18ncmp expect output &&
1143 git config -f .gitmodules --remove-section submodule.subname
1146 test_expect_success
".git/config ignore=untracked doesn't suppress submodules with modified content" '
1147 git config --add -f .gitmodules submodule.subname.ignore none &&
1148 git config --add -f .gitmodules submodule.subname.path sm &&
1149 git config --add submodule.subname.ignore untracked &&
1150 git config --add submodule.subname.path sm &&
1151 git status >output &&
1152 test_i18ncmp expect output &&
1153 git config --remove-section submodule.subname &&
1154 git config -f .gitmodules --remove-section submodule.subname
1157 head2
=$
(cd sm
&& git commit
-q -m "2nd commit" foo
&& git rev-parse
--short=7 --verify HEAD
)
1161 # Changes to be committed:
1162 # (use "git reset HEAD <file>..." to unstage)
1166 # Changes not staged for commit:
1167 # (use "git add <file>..." to update what will be committed)
1168 # (use "git checkout -- <file>..." to discard changes in working directory)
1170 # modified: dir1/modified
1171 # modified: sm (new commits)
1173 # Submodule changes to be committed:
1175 # * sm $head...$new_head (1):
1178 # Submodules changed but not updated:
1180 # * sm $new_head...$head2 (1):
1184 # (use "git add <file>..." to include in what will be committed)
1195 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodule summary" '
1196 git status --ignore-submodules=untracked > output &&
1197 test_i18ncmp expect output
1200 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodule summary" '
1201 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1202 git config --add -f .gitmodules submodule.subname.path sm &&
1203 git status >output &&
1204 test_i18ncmp expect output &&
1205 git config -f .gitmodules --remove-section submodule.subname
1208 test_expect_success
".git/config ignore=untracked doesn't suppress submodule summary" '
1209 git config --add -f .gitmodules submodule.subname.ignore none &&
1210 git config --add -f .gitmodules submodule.subname.path sm &&
1211 git config --add submodule.subname.ignore untracked &&
1212 git config --add submodule.subname.path sm &&
1213 git status >output &&
1214 test_i18ncmp expect output &&
1215 git config --remove-section submodule.subname &&
1216 git config -f .gitmodules --remove-section submodule.subname
1219 test_expect_success
"--ignore-submodules=dirty doesn't suppress submodule summary" '
1220 git status --ignore-submodules=dirty > output &&
1221 test_i18ncmp expect output
1223 test_expect_success
".gitmodules ignore=dirty doesn't suppress submodule summary" '
1224 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1225 git config --add -f .gitmodules submodule.subname.path sm &&
1226 git status >output &&
1227 test_i18ncmp expect output &&
1228 git config -f .gitmodules --remove-section submodule.subname
1231 test_expect_success
".git/config ignore=dirty doesn't suppress submodule summary" '
1232 git config --add -f .gitmodules submodule.subname.ignore none &&
1233 git config --add -f .gitmodules submodule.subname.path sm &&
1234 git config --add submodule.subname.ignore dirty &&
1235 git config --add submodule.subname.path sm &&
1236 git status >output &&
1237 test_i18ncmp expect output &&
1238 git config --remove-section submodule.subname &&
1239 git config -f .gitmodules --remove-section submodule.subname
1244 # Changes not staged for commit:
1245 # (use "git add <file>..." to update what will be committed)
1246 # (use "git checkout -- <file>..." to discard changes in working directory)
1248 # modified: dir1/modified
1251 # (use "git add <file>..." to include in what will be committed)
1260 no changes added to commit (use "git add" and/or "git commit -a")
1263 test_expect_success
"--ignore-submodules=all suppresses submodule summary" '
1264 git status --ignore-submodules=all > output &&
1265 test_i18ncmp expect output
1268 test_expect_failure
'.gitmodules ignore=all suppresses submodule summary' '
1269 git config --add -f .gitmodules submodule.subname.ignore all &&
1270 git config --add -f .gitmodules submodule.subname.path sm &&
1271 git status > output &&
1272 test_cmp expect output &&
1273 git config -f .gitmodules --remove-section submodule.subname
1276 test_expect_failure
'.git/config ignore=all suppresses submodule summary' '
1277 git config --add -f .gitmodules submodule.subname.ignore none &&
1278 git config --add -f .gitmodules submodule.subname.path sm &&
1279 git config --add submodule.subname.ignore all &&
1280 git config --add submodule.subname.path sm &&
1281 git status > output &&
1282 test_cmp expect output &&
1283 git config --remove-section submodule.subname &&
1284 git config -f .gitmodules --remove-section submodule.subname