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 grep "[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 grep "[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 C_LOCALE_OUTPUT 'status (1)' '
60 grep "use \"git rm --cached <file>\.\.\.\" to unstage" 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)
88 test_expect_success C_LOCALE_OUTPUT 'status (2)' '
91 test_cmp expect output
97 # Changes to be committed:
98 # new file: dir2/added
100 # Changes not staged for commit:
101 # modified: dir1/modified
112 git config advice.statusHints false
114 test_expect_success C_LOCALE_OUTPUT 'status (advice.statusHints false)' '
116 git status >output &&
117 test_cmp expect output
121 git config --unset advice.statusHints
134 test_expect_success 'status -s' '
136 git status -s >output &&
137 test_cmp expect output
153 test_expect_success 'status -s -b' '
155 git status -s -b >output &&
156 test_cmp expect output
160 test_expect_success 'setup dir3' '
162 : >dir3/untracked1 &&
168 # Changes to be committed:
169 # (use "git reset HEAD <file>..." to unstage)
171 # new file: dir2/added
173 # Changes not staged for commit:
174 # (use "git add <file>..." to update what will be committed)
175 # (use "git checkout -- <file>..." to discard changes in working directory)
177 # modified: dir1/modified
179 # Untracked files not listed (use -u option to show untracked files)
181 test_expect_success C_LOCALE_OUTPUT 'status -uno' '
182 git status -uno >output &&
183 test_cmp expect output
186 test_expect_success C_LOCALE_OUTPUT 'status (status.showUntrackedFiles no)' '
187 git config status.showuntrackedfiles no
188 test_when_finished "git config --unset status.showuntrackedfiles" &&
189 git status >output &&
190 test_cmp expect output
195 # Changes to be committed:
196 # new file: dir2/added
198 # Changes not staged for commit:
199 # modified: dir1/modified
201 # Untracked files not listed
203 git config advice.statusHints false
204 test_expect_success C_LOCALE_OUTPUT 'status -uno (advice.statusHints false)' '
205 git status -uno >output &&
206 test_cmp expect output
208 git config --unset advice.statusHints
214 test_expect_success 'status -s -uno' '
215 git status -s -uno >output &&
216 test_cmp expect output
219 test_expect_success 'status -s (status.showUntrackedFiles no)' '
220 git config status.showuntrackedfiles no
221 git status -s >output &&
222 test_cmp expect output
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 <file>..." to include in what will be committed)
249 test_expect_success C_LOCALE_OUTPUT 'status -unormal' '
250 git status -unormal >output &&
251 test_cmp expect output
254 test_expect_success C_LOCALE_OUTPUT 'status (status.showUntrackedFiles normal)' '
255 git config status.showuntrackedfiles normal
256 test_when_finished "git config --unset status.showuntrackedfiles" &&
257 git status >output &&
258 test_cmp expect output
272 test_expect_success 'status -s -unormal' '
273 git status -s -unormal >output &&
274 test_cmp expect output
277 test_expect_success 'status -s (status.showUntrackedFiles normal)' '
278 git config status.showuntrackedfiles normal
279 git status -s >output &&
280 test_cmp expect output
285 # Changes to be committed:
286 # (use "git reset HEAD <file>..." to unstage)
288 # new file: dir2/added
290 # Changes not staged for commit:
291 # (use "git add <file>..." to update what will be committed)
292 # (use "git checkout -- <file>..." to discard changes in working directory)
294 # modified: dir1/modified
297 # (use "git add <file>..." to include in what will be committed)
308 test_expect_success C_LOCALE_OUTPUT 'status -uall' '
309 git status -uall >output &&
310 test_cmp expect output
312 test_expect_success C_LOCALE_OUTPUT 'status (status.showUntrackedFiles all)' '
313 git config status.showuntrackedfiles all
314 test_when_finished "git config --unset status.showuntrackedfiles" &&
315 git status >output &&
316 test_cmp expect output
319 test_expect_success 'teardown dir3' '
333 test_expect_success 'status -s -uall' '
334 git config --unset status.showuntrackedfiles
335 git status -s -uall >output &&
336 test_cmp expect output
338 test_expect_success 'status -s (status.showUntrackedFiles all)' '
339 git config status.showuntrackedfiles all
340 git status -s >output &&
342 git config --unset status.showuntrackedfiles &&
343 test_cmp expect output
348 # Changes to be committed:
349 # (use "git reset HEAD <file>..." to unstage)
351 # new file: ../dir2/added
353 # Changes not staged for commit:
354 # (use "git add <file>..." to update what will be committed)
355 # (use "git checkout -- <file>..." to discard changes in working directory)
360 # (use "git add <file>..." to include in what will be committed)
370 test_expect_success C_LOCALE_OUTPUT 'status with relative paths' '
372 (cd dir1 && git status) >output &&
373 test_cmp expect output
387 test_expect_success 'status -s with relative paths' '
389 (cd dir1 && git status -s) >output &&
390 test_cmp expect output
405 test_expect_success 'status --porcelain ignores relative paths setting' '
407 (cd dir1 && git status --porcelain) >output &&
408 test_cmp expect output
412 test_expect_success 'setup unique colors' '
414 git config status.color.untracked blue &&
415 git config status.color.branch green
420 # On branch <GREEN>master<RESET>
421 # Changes to be committed:
422 # (use "git reset HEAD <file>..." to unstage)
424 # <GREEN>new file: dir2/added<RESET>
426 # Changes not staged for commit:
427 # (use "git add <file>..." to update what will be committed)
428 # (use "git checkout -- <file>..." to discard changes in working directory)
430 # <RED>modified: dir1/modified<RESET>
433 # (use "git add <file>..." to include in what will be committed)
435 # <BLUE>dir1/untracked<RESET>
436 # <BLUE>dir2/modified<RESET>
437 # <BLUE>dir2/untracked<RESET>
438 # <BLUE>expect<RESET>
439 # <BLUE>output<RESET>
440 # <BLUE>untracked<RESET>
443 test_expect_success C_LOCALE_OUTPUT 'status with color.ui' '
445 git config color.ui always &&
446 test_when_finished "git config --unset color.ui" &&
447 git status | test_decode_color >output &&
448 test_cmp expect output
452 test_expect_success C_LOCALE_OUTPUT 'status with color.status' '
454 git config color.status always &&
455 test_when_finished "git config --unset color.status" &&
456 git status | test_decode_color >output &&
457 test_cmp expect output
462 <RED>M<RESET> dir1/modified
463 <GREEN>A<RESET> dir2/added
464 <BLUE>??<RESET> dir1/untracked
465 <BLUE>??<RESET> dir2/modified
466 <BLUE>??<RESET> dir2/untracked
467 <BLUE>??<RESET> expect
468 <BLUE>??<RESET> output
469 <BLUE>??<RESET> untracked
472 test_expect_success 'status -s with color.ui' '
474 git config color.ui always &&
475 git status -s | test_decode_color >output &&
476 test_cmp expect output
480 test_expect_success 'status -s with color.status' '
482 git config --unset color.ui &&
483 git config color.status always &&
484 git status -s | test_decode_color >output &&
485 test_cmp expect output
490 ## <GREEN>master<RESET>
491 <RED>M<RESET> dir1/modified
492 <GREEN>A<RESET> dir2/added
493 <BLUE>??<RESET> dir1/untracked
494 <BLUE>??<RESET> dir2/modified
495 <BLUE>??<RESET> dir2/untracked
496 <BLUE>??<RESET> expect
497 <BLUE>??<RESET> output
498 <BLUE>??<RESET> untracked
501 test_expect_success 'status -s -b with color.status' '
503 git status -s -b | test_decode_color >output &&
504 test_cmp expect output
519 test_expect_success 'status --porcelain ignores color.ui' '
521 git config --unset color.status &&
522 git config color.ui always &&
523 git status --porcelain | test_decode_color >output &&
524 test_cmp expect output
528 test_expect_success 'status --porcelain ignores color.status' '
530 git config --unset color.ui &&
531 git config color.status always &&
532 git status --porcelain | test_decode_color >output &&
533 test_cmp expect output
537 # recover unconditionally from color tests
538 git config --unset color.status
539 git config --unset color.ui
541 test_expect_success 'status --porcelain ignores -b' '
543 git status --porcelain -b >output &&
544 test_cmp expect output
550 # Changes to be committed:
551 # (use "git reset HEAD <file>..." to unstage)
553 # new file: dir2/added
555 # Changes not staged for commit:
556 # (use "git add <file>..." to update what will be committed)
557 # (use "git checkout -- <file>..." to discard changes in working directory)
559 # modified: dir1/modified
562 # (use "git add <file>..." to include in what will be committed)
573 test_expect_success C_LOCALE_OUTPUT 'status without relative paths' '
575 git config status.relativePaths false &&
576 test_when_finished "git config --unset status.relativePaths" &&
577 (cd dir1 && git status) >output &&
578 test_cmp expect output
593 test_expect_success 'status -s without relative paths' '
595 git config status.relativePaths false &&
596 test_when_finished "git config --unset status.relativePaths" &&
597 (cd dir1 && git status -s) >output &&
598 test_cmp expect output
604 # Changes to be committed:
605 # (use "git reset HEAD <file>..." to unstage)
607 # modified: dir1/modified
610 # (use "git add <file>..." to include in what will be committed)
618 test_expect_success 'dry-run of partial commit excluding new file in index' '
619 git commit --dry-run dir1/modified >output
622 test_expect_success C_LOCALE_OUTPUT 'dry-run of partial commit excluding new file in index: output' '
623 test_cmp expect output
627 :100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M dir1/modified
629 test_expect_success 'status refreshes the index' '
632 git diff-files >output &&
633 test_cmp expect output
636 test_expect_success 'setup status submodule summary' '
637 test_create_repo sm && (
641 git commit -m "Add foo"
648 # Changes to be committed:
649 # (use "git reset HEAD <file>..." to unstage)
651 # new file: dir2/added
654 # Changes not staged for commit:
655 # (use "git add <file>..." to update what will be committed)
656 # (use "git checkout -- <file>..." to discard changes in working directory)
658 # modified: dir1/modified
661 # (use "git add <file>..." to include in what will be committed)
670 test_expect_success C_LOCALE_OUTPUT 'status submodule summary is disabled by default' '
671 git status >output &&
672 test_cmp expect output
675 # we expect the same as the previous test
676 test_expect_success C_LOCALE_OUTPUT 'status --untracked-files=all does not show submodule' '
677 git status --untracked-files=all >output &&
678 test_cmp expect output
692 test_expect_success 'status -s submodule summary is disabled by default' '
693 git status -s >output &&
694 test_cmp expect output
697 # we expect the same as the previous test
698 test_expect_success 'status -s --untracked-files=all does not show submodule' '
699 git status -s --untracked-files=all >output &&
700 test_cmp expect output
703 head=$(cd sm && git rev-parse --short=7 --verify HEAD)
707 # Changes to be committed:
708 # (use "git reset HEAD <file>..." to unstage)
710 # new file: dir2/added
713 # Changes not staged for commit:
714 # (use "git add <file>..." to update what will be committed)
715 # (use "git checkout -- <file>..." to discard changes in working directory)
717 # modified: dir1/modified
719 # Submodule changes to be committed:
721 # * sm 0000000...$head (1):
725 # (use "git add <file>..." to include in what will be committed)
734 test_expect_success C_LOCALE_OUTPUT 'status submodule summary' '
735 git config status.submodulesummary 10 &&
736 git status >output &&
737 test_cmp expect output
751 test_expect_success 'status -s submodule summary' '
752 git status -s >output &&
753 test_cmp expect output
758 # Changes not staged for commit:
759 # (use "git add <file>..." to update what will be committed)
760 # (use "git checkout -- <file>..." to discard changes in working directory)
762 # modified: dir1/modified
765 # (use "git add <file>..." to include in what will be committed)
773 no changes added to commit (use "git add" and/or "git commit -a")
775 test_expect_success 'status submodule summary (clean submodule): commit' '
776 git commit -m "commit submodule"
779 test_expect_success C_LOCALE_OUTPUT 'status submodule summary (clean submodule): output' '
780 git config status.submodulesummary 10 &&
781 test_must_fail git commit --dry-run >output &&
782 test_cmp expect output &&
783 git status >output &&
784 test_cmp expect output
796 test_expect_success 'status -s submodule summary (clean submodule)' '
797 git status -s >output &&
798 test_cmp expect output
803 # Changes to be committed:
804 # (use "git reset HEAD^1 <file>..." to unstage)
806 # new file: dir2/added
809 # Changes not staged for commit:
810 # (use "git add <file>..." to update what will be committed)
811 # (use "git checkout -- <file>..." to discard changes in working directory)
813 # modified: dir1/modified
815 # Submodule changes to be committed:
817 # * sm 0000000...$head (1):
821 # (use "git add <file>..." to include in what will be committed)
830 test_expect_success C_LOCALE_OUTPUT 'commit --dry-run submodule summary (--amend)' '
831 git config status.submodulesummary 10 &&
832 git commit --dry-run --amend >output &&
833 test_cmp expect output
836 test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository' '
839 # make dir1/tracked stat-dirty
840 >dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked &&
841 git status -s >output &&
842 ! grep dir1/tracked output &&
843 # make sure "status" succeeded without writing index out
844 git diff-files | grep dir1/tracked
851 (cd sm && echo > bar && git add bar && git commit -q -m 'Add bar') && git add sm
852 new_head=$(cd sm && git rev-parse --short=7 --verify HEAD)
857 # Changes to be committed:
858 # (use "git reset HEAD <file>..." to unstage)
862 # Changes not staged for commit:
863 # (use "git add <file>..." to update what will be committed)
864 # (use "git checkout -- <file>..." to discard changes in working directory)
866 # modified: dir1/modified
868 # Submodule changes to be committed:
870 # * sm $head...$new_head (1):
874 # (use "git add <file>..." to include in what will be committed)
885 test_expect_success C_LOCALE_OUTPUT '--ignore-submodules=untracked suppresses submodules with untracked content' '
886 echo modified > sm/untracked &&
887 git status --ignore-submodules=untracked > output &&
888 test_cmp expect output
891 test_expect_success C_LOCALE_OUTPUT '.gitmodules ignore=untracked suppresses submodules with untracked content' '
892 git config diff.ignoreSubmodules dirty &&
893 git status >output &&
894 test_cmp expect output &&
895 git config --add -f .gitmodules submodule.subname.ignore untracked &&
896 git config --add -f .gitmodules submodule.subname.path sm &&
897 git status > output &&
898 test_cmp expect output &&
899 git config -f .gitmodules --remove-section submodule.subname &&
900 git config --unset diff.ignoreSubmodules
903 test_expect_success C_LOCALE_OUTPUT '.git/config ignore=untracked suppresses submodules with untracked content' '
904 git config --add -f .gitmodules submodule.subname.ignore none &&
905 git config --add -f .gitmodules submodule.subname.path sm &&
906 git config --add submodule.subname.ignore untracked &&
907 git config --add submodule.subname.path sm &&
908 git status > output &&
909 test_cmp expect output &&
910 git config --remove-section submodule.subname &&
911 git config --remove-section -f .gitmodules submodule.subname
914 test_expect_success C_LOCALE_OUTPUT '--ignore-submodules=dirty suppresses submodules with untracked content' '
915 git status --ignore-submodules=dirty > output &&
916 test_cmp expect output
919 test_expect_success C_LOCALE_OUTPUT '.gitmodules ignore=dirty suppresses submodules with untracked content' '
920 git config diff.ignoreSubmodules dirty &&
921 git status >output &&
923 git config --add -f .gitmodules submodule.subname.ignore dirty &&
924 git config --add -f .gitmodules submodule.subname.path sm &&
925 git status > output &&
926 test_cmp expect output &&
927 git config -f .gitmodules --remove-section submodule.subname &&
928 git config --unset diff.ignoreSubmodules
931 test_expect_success C_LOCALE_OUTPUT '.git/config ignore=dirty suppresses submodules with untracked content' '
932 git config --add -f .gitmodules submodule.subname.ignore none &&
933 git config --add -f .gitmodules submodule.subname.path sm &&
934 git config --add submodule.subname.ignore dirty &&
935 git config --add submodule.subname.path sm &&
936 git status > output &&
937 test_cmp expect output &&
938 git config --remove-section submodule.subname &&
939 git config -f .gitmodules --remove-section submodule.subname
942 test_expect_success C_LOCALE_OUTPUT '--ignore-submodules=dirty suppresses submodules with modified content' '
943 echo modified > sm/foo &&
944 git status --ignore-submodules=dirty > output &&
945 test_cmp expect output
948 test_expect_success C_LOCALE_OUTPUT '.gitmodules ignore=dirty suppresses submodules with modified content' '
949 git config --add -f .gitmodules submodule.subname.ignore dirty &&
950 git config --add -f .gitmodules submodule.subname.path sm &&
951 git status > output &&
952 test_cmp expect output &&
953 git config -f .gitmodules --remove-section submodule.subname
956 test_expect_success C_LOCALE_OUTPUT '.git/config ignore=dirty suppresses submodules with modified content' '
957 git config --add -f .gitmodules submodule.subname.ignore none &&
958 git config --add -f .gitmodules submodule.subname.path sm &&
959 git config --add submodule.subname.ignore dirty &&
960 git config --add submodule.subname.path sm &&
961 git status > output &&
962 test_cmp expect output &&
963 git config --remove-section submodule.subname &&
964 git config -f .gitmodules --remove-section submodule.subname
969 # Changes to be committed:
970 # (use "git reset HEAD <file>..." to unstage)
974 # Changes not staged for commit:
975 # (use "git add <file>..." to update what will be committed)
976 # (use "git checkout -- <file>..." to discard changes in working directory)
977 # (commit or discard the untracked or modified content in submodules)
979 # modified: dir1/modified
980 # modified: sm (modified content)
982 # Submodule changes to be committed:
984 # * sm $head...$new_head (1):
988 # (use "git add <file>..." to include in what will be committed)
999 test_expect_success C_LOCALE_OUTPUT "--ignore-submodules=untracked doesn't suppress submodules with modified content" '
1000 git status --ignore-submodules=untracked > output &&
1001 test_cmp expect output
1004 test_expect_success C_LOCALE_OUTPUT ".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
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_cmp expect output &&
1009 git config -f .gitmodules --remove-section submodule.subname
1012 test_expect_success C_LOCALE_OUTPUT ".git/config ignore=untracked doesn't suppress submodules with modified content" '
1013 git config --add -f .gitmodules submodule.subname.ignore none &&
1014 git config --add -f .gitmodules submodule.subname.path sm &&
1015 git config --add submodule.subname.ignore untracked &&
1016 git config --add submodule.subname.path sm &&
1017 git status > output &&
1018 test_cmp expect output &&
1019 git config --remove-section submodule.subname &&
1020 git config -f .gitmodules --remove-section submodule.subname
1023 head2=$(cd sm && git commit -q -m "2nd commit" foo && git rev-parse --short=7 --verify HEAD)
1027 # Changes to be committed:
1028 # (use "git reset HEAD <file>..." to unstage)
1032 # Changes not staged for commit:
1033 # (use "git add <file>..." to update what will be committed)
1034 # (use "git checkout -- <file>..." to discard changes in working directory)
1036 # modified: dir1/modified
1037 # modified: sm (new commits)
1039 # Submodule changes to be committed:
1041 # * sm $head...$new_head (1):
1044 # Submodules changed but not updated:
1046 # * sm $new_head...$head2 (1):
1050 # (use "git add <file>..." to include in what will be committed)
1061 test_expect_success C_LOCALE_OUTPUT "--ignore-submodules=untracked doesn't suppress submodule summary" '
1062 git status --ignore-submodules=untracked > output &&
1063 test_cmp expect output
1066 test_expect_success C_LOCALE_OUTPUT ".gitmodules ignore=untracked doesn't suppress submodule summary" '
1067 git config --add -f .gitmodules submodule.subname.ignore untracked &&
1068 git config --add -f .gitmodules submodule.subname.path sm &&
1069 git status > output &&
1070 test_cmp expect output &&
1071 git config -f .gitmodules --remove-section submodule.subname
1074 test_expect_success C_LOCALE_OUTPUT ".git/config ignore=untracked doesn't suppress submodule summary" '
1075 git config --add -f .gitmodules submodule.subname.ignore none &&
1076 git config --add -f .gitmodules submodule.subname.path sm &&
1077 git config --add submodule.subname.ignore untracked &&
1078 git config --add submodule.subname.path sm &&
1079 git status > output &&
1080 test_cmp expect output &&
1081 git config --remove-section submodule.subname &&
1082 git config -f .gitmodules --remove-section submodule.subname
1085 test_expect_success C_LOCALE_OUTPUT "--ignore-submodules=dirty doesn't suppress submodule summary" '
1086 git status --ignore-submodules=dirty > output &&
1087 test_cmp expect output
1089 test_expect_success C_LOCALE_OUTPUT ".gitmodules ignore=dirty doesn't suppress submodule summary" '
1090 git config --add -f .gitmodules submodule.subname.ignore dirty &&
1091 git config --add -f .gitmodules submodule.subname.path sm &&
1092 git status > output &&
1093 test_cmp expect output &&
1094 git config -f .gitmodules --remove-section submodule.subname
1097 test_expect_success C_LOCALE_OUTPUT ".git/config ignore=dirty doesn't suppress submodule summary" '
1098 git config --add -f .gitmodules submodule.subname.ignore none &&
1099 git config --add -f .gitmodules submodule.subname.path sm &&
1100 git config --add submodule.subname.ignore dirty &&
1101 git config --add submodule.subname.path sm &&
1102 git status > output &&
1103 test_cmp expect output &&
1104 git config --remove-section submodule.subname &&
1105 git config -f .gitmodules --remove-section submodule.subname
1110 # Changes not staged for commit:
1111 # (use "git add <file>..." to update what will be committed)
1112 # (use "git checkout -- <file>..." to discard changes in working directory)
1114 # modified: dir1/modified
1117 # (use "git add <file>..." to include in what will be committed)
1126 no changes added to commit (use "git add" and/or "git commit -a")
1129 test_expect_success C_LOCALE_OUTPUT "--ignore-submodules=all suppresses submodule summary" '
1130 git status --ignore-submodules=all > output &&
1131 test_cmp expect output
1134 test_expect_failure '.gitmodules ignore=all suppresses submodule summary' '
1135 git config --add -f .gitmodules submodule.subname.ignore all &&
1136 git config --add -f .gitmodules submodule.subname.path sm &&
1137 git status > output &&
1138 test_cmp expect output &&
1139 git config -f .gitmodules --remove-section submodule.subname
1142 test_expect_failure '.git/config ignore=all suppresses submodule summary' '
1143 git config --add -f .gitmodules submodule.subname.ignore none &&
1144 git config --add -f .gitmodules submodule.subname.path sm &&
1145 git config --add submodule.subname.ignore all &&
1146 git config --add submodule.subname.path sm &&
1147 git status > output &&
1148 test_cmp expect output &&
1149 git config --remove-section submodule.subname &&
1150 git config -f .gitmodules --remove-section submodule.subname