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
'setup dir3' '
276 : >dir3/untracked1 &&
282 # Changes to be committed:
283 # (use "git reset HEAD <file>..." to unstage)
285 # new file: dir2/added
287 # Changes not staged for commit:
288 # (use "git add <file>..." to update what will be committed)
289 # (use "git checkout -- <file>..." to discard changes in working directory)
291 # modified: dir1/modified
293 # Untracked files not listed (use -u option to show untracked files)
295 test_expect_success
'status -uno' '
296 git status -uno >output &&
297 test_i18ncmp expect output
300 test_expect_success
'status (status.showUntrackedFiles no)' '
301 git config status.showuntrackedfiles no
302 test_when_finished "git config --unset status.showuntrackedfiles" &&
303 git status >output &&
304 test_i18ncmp expect output
309 # Changes to be committed:
310 # new file: dir2/added
312 # Changes not staged for commit:
313 # modified: dir1/modified
315 # Untracked files not listed
317 git config advice.statusHints false
318 test_expect_success
'status -uno (advice.statusHints false)' '
319 git status -uno >output &&
320 test_i18ncmp expect output
322 git config
--unset advice.statusHints
328 test_expect_success
'status -s -uno' '
329 git status -s -uno >output &&
330 test_cmp expect output
333 test_expect_success
'status -s (status.showUntrackedFiles no)' '
334 git config status.showuntrackedfiles no
335 git status -s >output &&
336 test_cmp expect output
341 # Changes to be committed:
342 # (use "git reset HEAD <file>..." to unstage)
344 # new file: dir2/added
346 # Changes not staged for commit:
347 # (use "git add <file>..." to update what will be committed)
348 # (use "git checkout -- <file>..." to discard changes in working directory)
350 # modified: dir1/modified
353 # (use "git add <file>..." to include in what will be committed)
363 test_expect_success
'status -unormal' '
364 git status -unormal >output &&
365 test_i18ncmp expect output
368 test_expect_success
'status (status.showUntrackedFiles normal)' '
369 git config status.showuntrackedfiles normal
370 test_when_finished "git config --unset status.showuntrackedfiles" &&
371 git status >output &&
372 test_i18ncmp expect output
386 test_expect_success
'status -s -unormal' '
387 git status -s -unormal >output &&
388 test_cmp expect output
391 test_expect_success
'status -s (status.showUntrackedFiles normal)' '
392 git config status.showuntrackedfiles normal
393 git status -s >output &&
394 test_cmp expect output
399 # Changes to be committed:
400 # (use "git reset HEAD <file>..." to unstage)
402 # new file: dir2/added
404 # Changes not staged for commit:
405 # (use "git add <file>..." to update what will be committed)
406 # (use "git checkout -- <file>..." to discard changes in working directory)
408 # modified: dir1/modified
411 # (use "git add <file>..." to include in what will be committed)
422 test_expect_success
'status -uall' '
423 git status -uall >output &&
424 test_i18ncmp expect output
427 test_expect_success
'status (status.showUntrackedFiles all)' '
428 git config status.showuntrackedfiles all
429 test_when_finished "git config --unset status.showuntrackedfiles" &&
430 git status >output &&
431 test_i18ncmp expect output
434 test_expect_success
'teardown dir3' '
448 test_expect_success
'status -s -uall' '
449 git config --unset status.showuntrackedfiles
450 git status -s -uall >output &&
451 test_cmp expect output
453 test_expect_success
'status -s (status.showUntrackedFiles all)' '
454 git config status.showuntrackedfiles all
455 git status -s >output &&
457 git config --unset status.showuntrackedfiles &&
458 test_cmp expect output
463 # Changes to be committed:
464 # (use "git reset HEAD <file>..." to unstage)
466 # new file: ../dir2/added
468 # Changes not staged for commit:
469 # (use "git add <file>..." to update what will be committed)
470 # (use "git checkout -- <file>..." to discard changes in working directory)
475 # (use "git add <file>..." to include in what will be committed)
485 test_expect_success
'status with relative paths' '
486 (cd dir1 && git status) >output &&
487 test_i18ncmp expect output
500 test_expect_success
'status -s with relative paths' '
502 (cd dir1 && git status -s) >output &&
503 test_cmp expect output
518 test_expect_success
'status --porcelain ignores relative paths setting' '
520 (cd dir1 && git status --porcelain) >output &&
521 test_cmp expect output
525 test_expect_success
'setup unique colors' '
527 git config status.color.untracked blue &&
528 git config status.color.branch green
533 # On branch <GREEN>master<RESET>
534 # Changes to be committed:
535 # (use "git reset HEAD <file>..." to unstage)
537 # <GREEN>new file: dir2/added<RESET>
539 # Changes not staged for commit:
540 # (use "git add <file>..." to update what will be committed)
541 # (use "git checkout -- <file>..." to discard changes in working directory)
543 # <RED>modified: dir1/modified<RESET>
546 # (use "git add <file>..." to include in what will be committed)
548 # <BLUE>dir1/untracked<RESET>
549 # <BLUE>dir2/modified<RESET>
550 # <BLUE>dir2/untracked<RESET>
551 # <BLUE>expect<RESET>
552 # <BLUE>output<RESET>
553 # <BLUE>untracked<RESET>
556 test_expect_success
'status with color.ui' '
557 git config color.ui always &&
558 test_when_finished "git config --unset color.ui" &&
559 git status | test_decode_color >output &&
560 test_i18ncmp expect output
563 test_expect_success
'status with color.status' '
564 git config color.status always &&
565 test_when_finished "git config --unset color.status" &&
566 git status | test_decode_color >output &&
567 test_i18ncmp expect output
571 <RED
>M
<RESET
> dir
1/modified
572 <GREEN
>A
<RESET
> dir
2/added
573 <BLUE
>??
<RESET
> dir
1/untracked
574 <BLUE
>??
<RESET
> dir
2/modified
575 <BLUE
>??
<RESET
> dir
2/untracked
576 <BLUE
>??
<RESET
> expect
577 <BLUE
>??
<RESET
> output
578 <BLUE
>??
<RESET
> untracked
581 test_expect_success
'status -s with color.ui' '
583 git config color.ui always &&
584 git status -s | test_decode_color >output &&
585 test_cmp expect output
589 test_expect_success
'status -s with color.status' '
591 git config --unset color.ui &&
592 git config color.status always &&
593 git status -s | test_decode_color >output &&
594 test_cmp expect output
599 ## <GREEN>master<RESET>
600 <RED
>M
<RESET
> dir
1/modified
601 <GREEN
>A
<RESET
> dir
2/added
602 <BLUE
>??
<RESET
> dir
1/untracked
603 <BLUE
>??
<RESET
> dir
2/modified
604 <BLUE
>??
<RESET
> dir
2/untracked
605 <BLUE
>??
<RESET
> expect
606 <BLUE
>??
<RESET
> output
607 <BLUE
>??
<RESET
> untracked
610 test_expect_success
'status -s -b with color.status' '
612 git status -s -b | test_decode_color >output &&
613 test_cmp expect output
628 test_expect_success
'status --porcelain ignores color.ui' '
630 git config --unset color.status &&
631 git config color.ui always &&
632 git status --porcelain | test_decode_color >output &&
633 test_cmp expect output
637 test_expect_success
'status --porcelain ignores color.status' '
639 git config --unset color.ui &&
640 git config color.status always &&
641 git status --porcelain | test_decode_color >output &&
642 test_cmp expect output
646 # recover unconditionally from color tests
647 git config
--unset color.status
648 git config
--unset color.ui
650 test_expect_success
'status --porcelain ignores -b' '
652 git status --porcelain -b >output &&
653 test_cmp expect output
659 # Changes to be committed:
660 # (use "git reset HEAD <file>..." to unstage)
662 # new file: dir2/added
664 # Changes not staged for commit:
665 # (use "git add <file>..." to update what will be committed)
666 # (use "git checkout -- <file>..." to discard changes in working directory)
668 # modified: dir1/modified
671 # (use "git add <file>..." to include in what will be committed)
682 test_expect_success
'status without relative paths' '
684 git config status.relativePaths false &&
685 test_when_finished "git config --unset status.relativePaths" &&
686 (cd dir1 && git status) >output &&
687 test_i18ncmp expect output
702 test_expect_success
'status -s without relative paths' '
704 git config status.relativePaths false &&
705 test_when_finished "git config --unset status.relativePaths" &&
706 (cd dir1 && git status -s) >output &&
707 test_cmp expect output
713 # Changes to be committed:
714 # (use "git reset HEAD <file>..." to unstage)
716 # modified: dir1/modified
719 # (use "git add <file>..." to include in what will be committed)
727 test_expect_success
'dry-run of partial commit excluding new file in index' '
728 git commit --dry-run dir1/modified >output &&
729 test_i18ncmp expect output
733 :100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M dir1/modified
735 test_expect_success
'status refreshes the index' '
738 git diff-files >output &&
739 test_cmp expect output
742 test_expect_success
'setup status submodule summary' '
743 test_create_repo sm && (
747 git commit -m "Add foo"
754 # Changes to be committed:
755 # (use "git reset HEAD <file>..." to unstage)
757 # new file: dir2/added
760 # Changes not staged for commit:
761 # (use "git add <file>..." to update what will be committed)
762 # (use "git checkout -- <file>..." to discard changes in working directory)
764 # modified: dir1/modified
767 # (use "git add <file>..." to include in what will be committed)
776 test_expect_success
'status submodule summary is disabled by default' '
777 git status >output &&
778 test_i18ncmp expect output
781 # we expect the same as the previous test
782 test_expect_success
'status --untracked-files=all does not show submodule' '
783 git status --untracked-files=all >output &&
784 test_i18ncmp expect output
798 test_expect_success
'status -s submodule summary is disabled by default' '
799 git status -s >output &&
800 test_cmp expect output
803 # we expect the same as the previous test
804 test_expect_success
'status -s --untracked-files=all does not show submodule' '
805 git status -s --untracked-files=all >output &&
806 test_cmp expect output
809 head=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
813 # Changes to be committed:
814 # (use "git reset HEAD <file>..." to unstage)
816 # new file: dir2/added
819 # Changes not staged for commit:
820 # (use "git add <file>..." to update what will be committed)
821 # (use "git checkout -- <file>..." to discard changes in working directory)
823 # modified: dir1/modified
825 # Submodule changes to be committed:
827 # * sm 0000000...$head (1):
831 # (use "git add <file>..." to include in what will be committed)
840 test_expect_success
'status submodule summary' '
841 git config status.submodulesummary 10 &&
842 git status >output &&
843 test_i18ncmp expect output
857 test_expect_success
'status -s submodule summary' '
858 git status -s >output &&
859 test_cmp expect output
864 # Changes not staged for commit:
865 # (use "git add <file>..." to update what will be committed)
866 # (use "git checkout -- <file>..." to discard changes in working directory)
868 # modified: dir1/modified
871 # (use "git add <file>..." to include in what will be committed)
879 no changes added to commit (use "git add" and/or "git commit -a")
881 test_expect_success
'status submodule summary (clean submodule): commit' '
882 git commit -m "commit submodule" &&
883 git config status.submodulesummary 10 &&
884 test_must_fail git commit --dry-run >output &&
885 test_i18ncmp expect output &&
886 git status >output &&
887 test_i18ncmp expect output
899 test_expect_success
'status -s submodule summary (clean submodule)' '
900 git status -s >output &&
901 test_cmp expect output
904 test_expect_success
'status -z implies porcelain' '
905 git status --porcelain |
906 perl -pe "s/\012/\000/g" >expect &&
907 git status -z >output &&
908 test_cmp expect output
913 # Changes to be committed:
914 # (use "git reset HEAD^1 <file>..." to unstage)
916 # new file: dir2/added
919 # Changes not staged for commit:
920 # (use "git add <file>..." to update what will be committed)
921 # (use "git checkout -- <file>..." to discard changes in working directory)
923 # modified: dir1/modified
925 # Submodule changes to be committed:
927 # * sm 0000000...$head (1):
931 # (use "git add <file>..." to include in what will be committed)
940 test_expect_success
'commit --dry-run submodule summary (--amend)' '
941 git config status.submodulesummary 10 &&
942 git commit --dry-run --amend >output &&
943 test_i18ncmp expect output
946 test_expect_success POSIXPERM
,SANITY
'status succeeds in a read-only repository' '
949 # make dir1/tracked stat-dirty
950 >dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked &&
951 git status -s >output &&
952 ! grep dir1/tracked output &&
953 # make sure "status" succeeded without writing index out
954 git diff-files | grep dir1/tracked
961 (cd sm
&& echo > bar
&& git add bar
&& git commit
-q -m 'Add bar') && git add sm
962 new_head
=$
(cd sm
&& git rev-parse
--short=7 --verify HEAD
)
967 # Changes to be committed:
968 # (use "git reset HEAD <file>..." to unstage)
972 # Changes not staged for commit:
973 # (use "git add <file>..." to update what will be committed)
974 # (use "git checkout -- <file>..." to discard changes in working directory)
976 # modified: dir1/modified
978 # Submodule changes to be committed:
980 # * sm $head...$new_head (1):
984 # (use "git add <file>..." to include in what will be committed)
995 test_expect_success
'--ignore-submodules=untracked suppresses submodules with untracked content' '
996 echo modified sm/untracked &&
997 git status --ignore-submodules=untracked >output &&
998 test_i18ncmp expect output
1001 test_expect_success
'.gitmodules ignore=untracked suppresses submodules with untracked content' '
1002 git config diff.ignoreSubmodules dirty &&
1003 git status >output &&
1004 test_i18ncmp expect output &&
1005 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1006 git config --add -f .gitmodules submodule.subname.path sm &&
1007 git status >output &&
1008 test_i18ncmp expect output &&
1009 git config -f .gitmodules --remove-section submodule.subname &&
1010 git config --unset diff.ignoreSubmodules
1013 test_expect_success
'.git/config ignore=untracked suppresses submodules with untracked content' '
1014 git config --add -f .gitmodules submodule.subname.ignore none &&
1015 git config --add -f .gitmodules submodule.subname.path sm &&
1016 git config --add submodule.subname.ignore untracked &&
1017 git config --add submodule.subname.path sm &&
1018 git status >output &&
1019 test_i18ncmp expect output &&
1020 git config --remove-section submodule.subname &&
1021 git config --remove-section -f .gitmodules submodule.subname
1024 test_expect_success
'--ignore-submodules=dirty suppresses submodules with untracked content' '
1025 git status --ignore-submodules=dirty >output &&
1026 test_i18ncmp expect output
1029 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with untracked content' '
1030 git config diff.ignoreSubmodules dirty &&
1031 git status >output &&
1033 git config --add -f .gitmodules submodule.subname.ignore dirty &&
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 &&
1038 git config --unset diff.ignoreSubmodules
1041 test_expect_success
'.git/config ignore=dirty suppresses submodules with untracked content' '
1042 git config --add -f .gitmodules submodule.subname.ignore none &&
1043 git config --add -f .gitmodules submodule.subname.path sm &&
1044 git config --add submodule.subname.ignore dirty &&
1045 git config --add submodule.subname.path sm &&
1046 git status >output &&
1047 test_i18ncmp expect output &&
1048 git config --remove-section submodule.subname &&
1049 git config -f .gitmodules --remove-section submodule.subname
1052 test_expect_success
'--ignore-submodules=dirty suppresses submodules with modified content' '
1053 echo modified >sm/foo &&
1054 git status --ignore-submodules=dirty >output &&
1055 test_i18ncmp expect output
1058 test_expect_success
'.gitmodules ignore=dirty suppresses submodules with modified content' '
1059 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1060 git config --add -f .gitmodules submodule.subname.path sm &&
1061 git status >output &&
1062 test_i18ncmp expect output &&
1063 git config -f .gitmodules --remove-section submodule.subname
1066 test_expect_success
'.git/config ignore=dirty suppresses submodules with modified content' '
1067 git config --add -f .gitmodules submodule.subname.ignore none &&
1068 git config --add -f .gitmodules submodule.subname.path sm &&
1069 git config --add submodule.subname.ignore dirty &&
1070 git config --add submodule.subname.path sm &&
1071 git status >output &&
1072 test_i18ncmp expect output &&
1073 git config --remove-section submodule.subname &&
1074 git config -f .gitmodules --remove-section submodule.subname
1079 # Changes to be committed:
1080 # (use "git reset HEAD <file>..." to unstage)
1084 # Changes not staged for commit:
1085 # (use "git add <file>..." to update what will be committed)
1086 # (use "git checkout -- <file>..." to discard changes in working directory)
1087 # (commit or discard the untracked or modified content in submodules)
1089 # modified: dir1/modified
1090 # modified: sm (modified content)
1092 # Submodule changes to be committed:
1094 # * sm $head...$new_head (1):
1098 # (use "git add <file>..." to include in what will be committed)
1109 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodules with modified content" '
1110 git status --ignore-submodules=untracked > output &&
1111 test_i18ncmp expect output
1114 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
1115 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1116 git config --add -f .gitmodules submodule.subname.path sm &&
1117 git status >output &&
1118 test_i18ncmp expect output &&
1119 git config -f .gitmodules --remove-section submodule.subname
1122 test_expect_success
".git/config ignore=untracked doesn't suppress submodules with modified content" '
1123 git config --add -f .gitmodules submodule.subname.ignore none &&
1124 git config --add -f .gitmodules submodule.subname.path sm &&
1125 git config --add submodule.subname.ignore untracked &&
1126 git config --add submodule.subname.path sm &&
1127 git status >output &&
1128 test_i18ncmp expect output &&
1129 git config --remove-section submodule.subname &&
1130 git config -f .gitmodules --remove-section submodule.subname
1133 head2
=$
(cd sm
&& git commit
-q -m "2nd commit" foo
&& git rev-parse
--short=7 --verify HEAD
)
1137 # Changes to be committed:
1138 # (use "git reset HEAD <file>..." to unstage)
1142 # Changes not staged for commit:
1143 # (use "git add <file>..." to update what will be committed)
1144 # (use "git checkout -- <file>..." to discard changes in working directory)
1146 # modified: dir1/modified
1147 # modified: sm (new commits)
1149 # Submodule changes to be committed:
1151 # * sm $head...$new_head (1):
1154 # Submodules changed but not updated:
1156 # * sm $new_head...$head2 (1):
1160 # (use "git add <file>..." to include in what will be committed)
1171 test_expect_success
"--ignore-submodules=untracked doesn't suppress submodule summary" '
1172 git status --ignore-submodules=untracked > output &&
1173 test_i18ncmp expect output
1176 test_expect_success
".gitmodules ignore=untracked doesn't suppress submodule summary" '
1177 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1178 git config --add -f .gitmodules submodule.subname.path sm &&
1179 git status >output &&
1180 test_i18ncmp expect output &&
1181 git config -f .gitmodules --remove-section submodule.subname
1184 test_expect_success
".git/config ignore=untracked doesn't suppress submodule summary" '
1185 git config --add -f .gitmodules submodule.subname.ignore none &&
1186 git config --add -f .gitmodules submodule.subname.path sm &&
1187 git config --add submodule.subname.ignore untracked &&
1188 git config --add submodule.subname.path sm &&
1189 git status >output &&
1190 test_i18ncmp expect output &&
1191 git config --remove-section submodule.subname &&
1192 git config -f .gitmodules --remove-section submodule.subname
1195 test_expect_success
"--ignore-submodules=dirty doesn't suppress submodule summary" '
1196 git status --ignore-submodules=dirty > output &&
1197 test_i18ncmp expect output
1199 test_expect_success
".gitmodules ignore=dirty doesn't suppress submodule summary" '
1200 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1201 git config --add -f .gitmodules submodule.subname.path sm &&
1202 git status >output &&
1203 test_i18ncmp expect output &&
1204 git config -f .gitmodules --remove-section submodule.subname
1207 test_expect_success
".git/config ignore=dirty doesn't suppress submodule summary" '
1208 git config --add -f .gitmodules submodule.subname.ignore none &&
1209 git config --add -f .gitmodules submodule.subname.path sm &&
1210 git config --add submodule.subname.ignore dirty &&
1211 git config --add submodule.subname.path sm &&
1212 git status >output &&
1213 test_i18ncmp expect output &&
1214 git config --remove-section submodule.subname &&
1215 git config -f .gitmodules --remove-section submodule.subname
1220 # Changes not staged for commit:
1221 # (use "git add <file>..." to update what will be committed)
1222 # (use "git checkout -- <file>..." to discard changes in working directory)
1224 # modified: dir1/modified
1227 # (use "git add <file>..." to include in what will be committed)
1236 no changes added to commit (use "git add" and/or "git commit -a")
1239 test_expect_success
"--ignore-submodules=all suppresses submodule summary" '
1240 git status --ignore-submodules=all > output &&
1241 test_i18ncmp expect output
1244 test_expect_failure
'.gitmodules ignore=all suppresses submodule summary' '
1245 git config --add -f .gitmodules submodule.subname.ignore all &&
1246 git config --add -f .gitmodules submodule.subname.path sm &&
1247 git status > output &&
1248 test_cmp expect output &&
1249 git config -f .gitmodules --remove-section submodule.subname
1252 test_expect_failure
'.git/config ignore=all suppresses submodule summary' '
1253 git config --add -f .gitmodules submodule.subname.ignore none &&
1254 git config --add -f .gitmodules submodule.subname.path sm &&
1255 git config --add submodule.subname.ignore all &&
1256 git config --add submodule.subname.path sm &&
1257 git status > output &&
1258 test_cmp expect output &&
1259 git config --remove-section submodule.subname &&
1260 git config -f .gitmodules --remove-section submodule.subname