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
64 # Changes to be committed:
65 # (use "git reset HEAD <file>..." to unstage)
67 # new file: dir2/added
69 # Changes not staged for commit:
70 # (use "git add <file>..." to update what will be committed)
71 # (use "git checkout -- <file>..." to discard changes in working directory)
73 # modified: dir1/modified
76 # (use "git add <file>..." to include in what will be committed)
86 test_expect_success
'status (2)' '
88 test_i18ncmp expect output
93 # Changes to be committed:
94 # new file: dir2/added
96 # Changes not staged for commit:
97 # modified: dir1/modified
108 test_expect_success
'status (advice.statusHints false)' '
109 test_when_finished "git config --unset advice.statusHints" &&
110 git config advice.statusHints false &&
111 git status >output &&
112 test_i18ncmp expect output
127 test_expect_success
'status -s' '
129 git status -s >output &&
130 test_cmp expect output
134 test_expect_success
'status with gitignore' '
142 cat >expect <<-\EOF &&
147 git status -s >output &&
148 test_cmp expect output &&
150 cat >expect <<-\EOF &&
161 git status -s --ignored >output &&
162 test_cmp expect output &&
164 cat >expect <<-\EOF &&
166 # Changes to be committed:
167 # (use "git reset HEAD <file>..." to unstage)
169 # new file: dir2/added
171 # Changes not staged for commit:
172 # (use "git add <file>..." to update what will be committed)
173 # (use "git checkout -- <file>..." to discard changes in working directory)
175 # modified: dir1/modified
178 # (use "git add <file>..." to include in what will be committed)
182 # (use "git add -f <file>..." to include in what will be committed)
191 git status --ignored >output &&
192 test_i18ncmp expect output
195 test_expect_success
'status with gitignore (nothing untracked)' '
199 echo "dir2/modified" &&
204 cat >expect <<-\EOF &&
208 git status -s >output &&
209 test_cmp expect output &&
211 cat >expect <<-\EOF &&
222 git status -s --ignored >output &&
223 test_cmp expect output &&
225 cat >expect <<-\EOF &&
227 # Changes to be committed:
228 # (use "git reset HEAD <file>..." to unstage)
230 # new file: dir2/added
232 # Changes not staged for commit:
233 # (use "git add <file>..." to update what will be committed)
234 # (use "git checkout -- <file>..." to discard changes in working directory)
236 # modified: dir1/modified
239 # (use "git add -f <file>..." to include in what will be committed)
249 git status --ignored >output &&
250 test_i18ncmp expect output
267 test_expect_success
'status -s -b' '
269 git status -s -b >output &&
270 test_cmp expect output
274 test_expect_success
'status -s -z -b' '
275 tr "\\n" Q <expect >expect.q &&
276 mv expect.q expect &&
277 git status -s -z -b >output &&
278 nul_to_q <output >output.q &&
279 mv output.q output &&
280 test_cmp expect output
283 test_expect_success
'setup dir3' '
285 : >dir3/untracked1 &&
291 # Changes to be committed:
292 # (use "git reset HEAD <file>..." to unstage)
294 # new file: dir2/added
296 # Changes not staged for commit:
297 # (use "git add <file>..." to update what will be committed)
298 # (use "git checkout -- <file>..." to discard changes in working directory)
300 # modified: dir1/modified
302 # Untracked files not listed (use -u option to show untracked files)
304 test_expect_success
'status -uno' '
305 git status -uno >output &&
306 test_i18ncmp expect output
309 test_expect_success
'status (status.showUntrackedFiles no)' '
310 git config status.showuntrackedfiles no
311 test_when_finished "git config --unset status.showuntrackedfiles" &&
312 git status >output &&
313 test_i18ncmp expect output
318 # Changes to be committed:
319 # new file: dir2/added
321 # Changes not staged for commit:
322 # modified: dir1/modified
324 # Untracked files not listed
326 git config advice.statusHints false
327 test_expect_success
'status -uno (advice.statusHints false)' '
328 git status -uno >output &&
329 test_i18ncmp expect output
331 git config
--unset advice.statusHints
337 test_expect_success
'status -s -uno' '
338 git status -s -uno >output &&
339 test_cmp expect output
342 test_expect_success
'status -s (status.showUntrackedFiles no)' '
343 git config status.showuntrackedfiles no
344 git status -s >output &&
345 test_cmp expect output
350 # Changes to be committed:
351 # (use "git reset HEAD <file>..." to unstage)
353 # new file: dir2/added
355 # Changes not staged for commit:
356 # (use "git add <file>..." to update what will be committed)
357 # (use "git checkout -- <file>..." to discard changes in working directory)
359 # modified: dir1/modified
362 # (use "git add <file>..." to include in what will be committed)
372 test_expect_success
'status -unormal' '
373 git status -unormal >output &&
374 test_i18ncmp expect output
377 test_expect_success
'status (status.showUntrackedFiles normal)' '
378 git config status.showuntrackedfiles normal
379 test_when_finished "git config --unset status.showuntrackedfiles" &&
380 git status >output &&
381 test_i18ncmp expect output
395 test_expect_success
'status -s -unormal' '
396 git status -s -unormal >output &&
397 test_cmp expect output
400 test_expect_success
'status -s (status.showUntrackedFiles normal)' '
401 git config status.showuntrackedfiles normal
402 git status -s >output &&
403 test_cmp expect output
408 # Changes to be committed:
409 # (use "git reset HEAD <file>..." to unstage)
411 # new file: dir2/added
413 # Changes not staged for commit:
414 # (use "git add <file>..." to update what will be committed)
415 # (use "git checkout -- <file>..." to discard changes in working directory)
417 # modified: dir1/modified
420 # (use "git add <file>..." to include in what will be committed)
431 test_expect_success
'status -uall' '
432 git status -uall >output &&
433 test_i18ncmp expect output
436 test_expect_success
'status (status.showUntrackedFiles all)' '
437 git config status.showuntrackedfiles all
438 test_when_finished "git config --unset status.showuntrackedfiles" &&
439 git status >output &&
440 test_i18ncmp expect output
443 test_expect_success
'teardown dir3' '
457 test_expect_success
'status -s -uall' '
458 git config --unset status.showuntrackedfiles
459 git status -s -uall >output &&
460 test_cmp expect output
462 test_expect_success
'status -s (status.showUntrackedFiles all)' '
463 git config status.showuntrackedfiles all
464 git status -s >output &&
466 git config --unset status.showuntrackedfiles &&
467 test_cmp expect output
472 # Changes to be committed:
473 # (use "git reset HEAD <file>..." to unstage)
475 # new file: ../dir2/added
477 # Changes not staged for commit:
478 # (use "git add <file>..." to update what will be committed)
479 # (use "git checkout -- <file>..." to discard changes in working directory)
484 # (use "git add <file>..." to include in what will be committed)
494 test_expect_success
'status with relative paths' '
495 (cd dir1 && git status) >output &&
496 test_i18ncmp expect output
509 test_expect_success
'status -s with relative paths' '
511 (cd dir1 && git status -s) >output &&
512 test_cmp expect output
527 test_expect_success
'status --porcelain ignores relative paths setting' '
529 (cd dir1 && git status --porcelain) >output &&
530 test_cmp expect output
534 test_expect_success
'setup unique colors' '
536 git config status.color.untracked blue &&
537 git config status.color.branch green
542 # On branch <GREEN>master<RESET>
543 # Changes to be committed:
544 # (use "git reset HEAD <file>..." to unstage)
546 # <GREEN>new file: dir2/added<RESET>
548 # Changes not staged for commit:
549 # (use "git add <file>..." to update what will be committed)
550 # (use "git checkout -- <file>..." to discard changes in working directory)
552 # <RED>modified: dir1/modified<RESET>
555 # (use "git add <file>..." to include in what will be committed)
557 # <BLUE>dir1/untracked<RESET>
558 # <BLUE>dir2/modified<RESET>
559 # <BLUE>dir2/untracked<RESET>
560 # <BLUE>expect<RESET>
561 # <BLUE>output<RESET>
562 # <BLUE>untracked<RESET>
565 test_expect_success
'status with color.ui' '
566 git config color.ui always &&
567 test_when_finished "git config --unset color.ui" &&
568 git status | test_decode_color >output &&
569 test_i18ncmp expect output
572 test_expect_success
'status with color.status' '
573 git config color.status always &&
574 test_when_finished "git config --unset color.status" &&
575 git status | test_decode_color >output &&
576 test_i18ncmp expect output
580 <RED
>M
<RESET
> dir
1/modified
581 <GREEN
>A
<RESET
> dir
2/added
582 <BLUE
>??
<RESET
> dir
1/untracked
583 <BLUE
>??
<RESET
> dir
2/modified
584 <BLUE
>??
<RESET
> dir
2/untracked
585 <BLUE
>??
<RESET
> expect
586 <BLUE
>??
<RESET
> output
587 <BLUE
>??
<RESET
> untracked
590 test_expect_success
'status -s with color.ui' '
592 git config color.ui always &&
593 git status -s | test_decode_color >output &&
594 test_cmp expect output
598 test_expect_success
'status -s with color.status' '
600 git config --unset color.ui &&
601 git config color.status always &&
602 git status -s | test_decode_color >output &&
603 test_cmp expect output
608 ## <GREEN>master<RESET>
609 <RED
>M
<RESET
> dir
1/modified
610 <GREEN
>A
<RESET
> dir
2/added
611 <BLUE
>??
<RESET
> dir
1/untracked
612 <BLUE
>??
<RESET
> dir
2/modified
613 <BLUE
>??
<RESET
> dir
2/untracked
614 <BLUE
>??
<RESET
> expect
615 <BLUE
>??
<RESET
> output
616 <BLUE
>??
<RESET
> untracked
619 test_expect_success
'status -s -b with color.status' '
621 git status -s -b | test_decode_color >output &&
622 test_cmp expect output
637 test_expect_success
'status --porcelain ignores color.ui' '
639 git config --unset color.status &&
640 git config color.ui always &&
641 git status --porcelain | test_decode_color >output &&
642 test_cmp expect output
646 test_expect_success
'status --porcelain ignores color.status' '
648 git config --unset color.ui &&
649 git config color.status always &&
650 git status --porcelain | test_decode_color >output &&
651 test_cmp expect output
655 # recover unconditionally from color tests
656 git config
--unset color.status
657 git config
--unset color.ui
659 test_expect_success
'status --porcelain respects -b' '
661 git status --porcelain -b >output &&
667 test_cmp expect output
673 # Changes to be committed:
674 # (use "git reset HEAD <file>..." to unstage)
676 # new file: dir2/added
678 # Changes not staged for commit:
679 # (use "git add <file>..." to update what will be committed)
680 # (use "git checkout -- <file>..." to discard changes in working directory)
682 # modified: dir1/modified
685 # (use "git add <file>..." to include in what will be committed)
696 test_expect_success
'status without relative paths' '
698 git config status.relativePaths false &&
699 test_when_finished "git config --unset status.relativePaths" &&
700 (cd dir1 && git status) >output &&
701 test_i18ncmp expect output
716 test_expect_success
'status -s without relative paths' '
718 git config status.relativePaths false &&
719 test_when_finished "git config --unset status.relativePaths" &&
720 (cd dir1 && git status -s) >output &&
721 test_cmp expect output
727 # Changes to be committed:
728 # (use "git reset HEAD <file>..." to unstage)
730 # modified: dir1/modified
733 # (use "git add <file>..." to include in what will be committed)
741 test_expect_success
'dry-run of partial commit excluding new file in index' '
742 git commit --dry-run dir1/modified >output &&
743 test_i18ncmp expect output
747 :100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M dir1/modified
749 test_expect_success
'status refreshes the index' '
752 git diff-files >output &&
753 test_cmp expect output
756 test_expect_success
'setup status submodule summary' '
757 test_create_repo sm && (
761 git commit -m "Add foo"
768 # Changes to be committed:
769 # (use "git reset HEAD <file>..." to unstage)
771 # new file: dir2/added
774 # Changes not staged for commit:
775 # (use "git add <file>..." to update what will be committed)
776 # (use "git checkout -- <file>..." to discard changes in working directory)
778 # modified: dir1/modified
781 # (use "git add <file>..." to include in what will be committed)
790 test_expect_success
'status submodule summary is disabled by default' '
791 git status >output &&
792 test_i18ncmp expect output
795 # we expect the same as the previous test
796 test_expect_success
'status --untracked-files=all does not show submodule' '
797 git status --untracked-files=all >output &&
798 test_i18ncmp expect output
812 test_expect_success
'status -s submodule summary is disabled by default' '
813 git status -s >output &&
814 test_cmp expect output
817 # we expect the same as the previous test
818 test_expect_success
'status -s --untracked-files=all does not show submodule' '
819 git status -s --untracked-files=all >output &&
820 test_cmp expect output
823 head=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
827 # Changes to be committed:
828 # (use "git reset HEAD <file>..." to unstage)
830 # new file: dir2/added
833 # Changes not staged for commit:
834 # (use "git add <file>..." to update what will be committed)
835 # (use "git checkout -- <file>..." to discard changes in working directory)
837 # modified: dir1/modified
839 # Submodule changes to be committed:
841 # * sm 0000000...$head (1):
845 # (use "git add <file>..." to include in what will be committed)
854 test_expect_success
'status submodule summary' '
855 git config status.submodulesummary 10 &&
856 git status >output &&
857 test_i18ncmp expect output
871 test_expect_success
'status -s submodule summary' '
872 git status -s >output &&
873 test_cmp expect output
878 # Changes not staged for commit:
879 # (use "git add <file>..." to update what will be committed)
880 # (use "git checkout -- <file>..." to discard changes in working directory)
882 # modified: dir1/modified
885 # (use "git add <file>..." to include in what will be committed)
893 no changes added to commit (use "git add" and/or "git commit -a")
895 test_expect_success
'status submodule summary (clean submodule): commit' '
896 git commit -m "commit submodule" &&
897 git config status.submodulesummary 10 &&
898 test_must_fail git commit --dry-run >output &&
899 test_i18ncmp expect output &&
900 git status >output &&
901 test_i18ncmp expect output
913 test_expect_success
'status -s submodule summary (clean submodule)' '
914 git status -s >output &&
915 test_cmp expect output
918 test_expect_success
'status -z implies porcelain' '
919 git status --porcelain |
920 perl -pe "s/\012/\000/g" >expect &&
921 git status -z >output &&
922 test_cmp expect output
927 # Changes to be committed:
928 # (use "git reset HEAD^1 <file>..." to unstage)
930 # new file: dir2/added
933 # Changes not staged for commit:
934 # (use "git add <file>..." to update what will be committed)
935 # (use "git checkout -- <file>..." to discard changes in working directory)
937 # modified: dir1/modified
939 # Submodule changes to be committed:
941 # * sm 0000000...$head (1):
945 # (use "git add <file>..." to include in what will be committed)
954 test_expect_success
'commit --dry-run submodule summary (--amend)' '
955 git config status.submodulesummary 10 &&
956 git commit --dry-run --amend >output &&
957 test_i18ncmp expect output
960 test_expect_success POSIXPERM
,SANITY
'status succeeds in a read-only repository' '
963 # make dir1/tracked stat-dirty
964 >dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked &&
965 git status -s >output &&
966 ! grep dir1/tracked output &&
967 # make sure "status" succeeded without writing index out
968 git diff-files | grep dir1/tracked
975 (cd sm
&& echo > bar
&& git add bar
&& git commit
-q -m 'Add bar') && git add sm
976 new_head
=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
981 # Changes to be committed:
982 # (use "git reset HEAD <file>..." to unstage)
986 # Changes not staged for commit:
987 # (use "git add <file>..." to update what will be committed)
988 # (use "git checkout -- <file>..." to discard changes in working directory)
990 # modified: dir1/modified
992 # Submodule changes to be committed:
994 # * sm $head...$new_head (1):
998 # (use "git add <file>..." to include in what will be committed)
1009 test_expect_success
'--ignore-submodules=untracked suppresses submodules with untracked content' '
1010 echo modified sm/untracked &&
1011 git status --ignore-submodules=untracked >output &&
1012 test_i18ncmp expect output
1015 test_expect_success
'.gitmodules ignore=untracked suppresses submodules with untracked content' '
1016 git config diff.ignoreSubmodules dirty &&
1017 git status >output &&
1018 test_i18ncmp expect output &&
1019 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1020 git config --add -f .gitmodules submodule.subname.path sm &&
1021 git status >output &&
1022 test_i18ncmp expect output &&
1023 git config -f .gitmodules --remove-section submodule.subname &&
1024 git config --unset diff.ignoreSubmodules
1027 test_expect_success
'.git/config ignore=untracked suppresses submodules with untracked content' '
1028 git config --add -f .gitmodules submodule.subname.ignore none &&
1029 git config --add -f .gitmodules submodule.subname.path sm &&
1030 git config --add submodule.subname.ignore untracked &&
1031 git config --add submodule.subname.path sm &&
1032 git status >output &&
1033 test_i18ncmp expect output &&
1034 git config --remove-section submodule.subname &&
1035 git config --remove-section -f .gitmodules submodule.subname
1038 test_expect_success
'--ignore-submodules=dirty suppresses submodules with untracked content' '
1039 git status --ignore-submodules=dirty >output &&
1040 test_i18ncmp expect output
1043 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with untracked content' '
1044 git config diff.ignoreSubmodules dirty &&
1045 git status >output &&
1047 git config --add -f .gitmodules submodule.subname.ignore dirty &&
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=dirty 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 dirty &&
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 -f .gitmodules --remove-section submodule.subname
1066 test_expect_success
'--ignore-submodules=dirty suppresses submodules with modified content' '
1067 echo modified >sm/foo &&
1068 git status --ignore-submodules=dirty >output &&
1069 test_i18ncmp expect output
1072 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with modified content' '
1073 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1074 git config --add -f .gitmodules submodule.subname.path sm &&
1075 git status >output &&
1076 test_i18ncmp expect output &&
1077 git config -f .gitmodules --remove-section submodule.subname
1080 test_expect_success
'.git/config ignore=dirty suppresses submodules with modified content' '
1081 git config --add -f .gitmodules submodule.subname.ignore none &&
1082 git config --add -f .gitmodules submodule.subname.path sm &&
1083 git config --add submodule.subname.ignore dirty &&
1084 git config --add submodule.subname.path sm &&
1085 git status >output &&
1086 test_i18ncmp expect output &&
1087 git config --remove-section submodule.subname &&
1088 git config -f .gitmodules --remove-section submodule.subname
1093 # Changes to be committed:
1094 # (use "git reset HEAD <file>..." to unstage)
1098 # Changes not staged for commit:
1099 # (use "git add <file>..." to update what will be committed)
1100 # (use "git checkout -- <file>..." to discard changes in working directory)
1101 # (commit or discard the untracked or modified content in submodules)
1103 # modified: dir1/modified
1104 # modified: sm (modified content)
1106 # Submodule changes to be committed:
1108 # * sm $head...$new_head (1):
1112 # (use "git add <file>..." to include in what will be committed)
1123 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodules with modified content" '
1124 git status --ignore-submodules=untracked > output &&
1125 test_i18ncmp expect output
1128 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
1129 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1130 git config --add -f .gitmodules submodule.subname.path sm &&
1131 git status >output &&
1132 test_i18ncmp expect output &&
1133 git config -f .gitmodules --remove-section submodule.subname
1136 test_expect_success
".git/config ignore=untracked doesn't suppress submodules with modified content" '
1137 git config --add -f .gitmodules submodule.subname.ignore none &&
1138 git config --add -f .gitmodules submodule.subname.path sm &&
1139 git config --add submodule.subname.ignore untracked &&
1140 git config --add submodule.subname.path sm &&
1141 git status >output &&
1142 test_i18ncmp expect output &&
1143 git config --remove-section submodule.subname &&
1144 git config -f .gitmodules --remove-section submodule.subname
1147 head2
=$
(cd sm
&& git commit
-q -m "2nd commit" foo
&& git rev-parse
--short=7 --verify HEAD
)
1151 # Changes to be committed:
1152 # (use "git reset HEAD <file>..." to unstage)
1156 # Changes not staged for commit:
1157 # (use "git add <file>..." to update what will be committed)
1158 # (use "git checkout -- <file>..." to discard changes in working directory)
1160 # modified: dir1/modified
1161 # modified: sm (new commits)
1163 # Submodule changes to be committed:
1165 # * sm $head...$new_head (1):
1168 # Submodules changed but not updated:
1170 # * sm $new_head...$head2 (1):
1174 # (use "git add <file>..." to include in what will be committed)
1185 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodule summary" '
1186 git status --ignore-submodules=untracked > output &&
1187 test_i18ncmp expect output
1190 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodule summary" '
1191 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1192 git config --add -f .gitmodules submodule.subname.path sm &&
1193 git status >output &&
1194 test_i18ncmp expect output &&
1195 git config -f .gitmodules --remove-section submodule.subname
1198 test_expect_success
".git/config ignore=untracked doesn't suppress submodule summary" '
1199 git config --add -f .gitmodules submodule.subname.ignore none &&
1200 git config --add -f .gitmodules submodule.subname.path sm &&
1201 git config --add submodule.subname.ignore untracked &&
1202 git config --add submodule.subname.path sm &&
1203 git status >output &&
1204 test_i18ncmp expect output &&
1205 git config --remove-section submodule.subname &&
1206 git config -f .gitmodules --remove-section submodule.subname
1209 test_expect_success
"--ignore-submodules=dirty doesn't suppress submodule summary" '
1210 git status --ignore-submodules=dirty > output &&
1211 test_i18ncmp expect output
1213 test_expect_success
".gitmodules ignore=dirty doesn't suppress submodule summary" '
1214 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1215 git config --add -f .gitmodules submodule.subname.path sm &&
1216 git status >output &&
1217 test_i18ncmp expect output &&
1218 git config -f .gitmodules --remove-section submodule.subname
1221 test_expect_success
".git/config ignore=dirty doesn't suppress submodule summary" '
1222 git config --add -f .gitmodules submodule.subname.ignore none &&
1223 git config --add -f .gitmodules submodule.subname.path sm &&
1224 git config --add submodule.subname.ignore dirty &&
1225 git config --add submodule.subname.path sm &&
1226 git status >output &&
1227 test_i18ncmp expect output &&
1228 git config --remove-section submodule.subname &&
1229 git config -f .gitmodules --remove-section submodule.subname
1234 # Changes not staged for commit:
1235 # (use "git add <file>..." to update what will be committed)
1236 # (use "git checkout -- <file>..." to discard changes in working directory)
1238 # modified: dir1/modified
1241 # (use "git add <file>..." to include in what will be committed)
1250 no changes added to commit (use "git add" and/or "git commit -a")
1253 test_expect_success
"--ignore-submodules=all suppresses submodule summary" '
1254 git status --ignore-submodules=all > output &&
1255 test_i18ncmp expect output
1258 test_expect_failure
'.gitmodules ignore=all suppresses submodule summary' '
1259 git config --add -f .gitmodules submodule.subname.ignore all &&
1260 git config --add -f .gitmodules submodule.subname.path sm &&
1261 git status > output &&
1262 test_cmp expect output &&
1263 git config -f .gitmodules --remove-section submodule.subname
1266 test_expect_failure
'.git/config ignore=all suppresses submodule summary' '
1267 git config --add -f .gitmodules submodule.subname.ignore none &&
1268 git config --add -f .gitmodules submodule.subname.path sm &&
1269 git config --add submodule.subname.ignore all &&
1270 git config --add submodule.subname.path sm &&
1271 git status > output &&
1272 test_cmp expect output &&
1273 git config --remove-section submodule.subname &&
1274 git config -f .gitmodules --remove-section submodule.subname