Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9da24d4

Browse files
committed
add test for submodule path not owned by submodule case
1 parent11839ab commit9da24d4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎test/test_submodule.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,28 @@ def assert_exists(sm, value=True):
906906
assertosp.isdir(sm_module_path)==dry_run
907907
# end for each dry-run mode
908908

909+
@with_rw_directory
910+
deftest_ignore_non_submodule_file(self,rwdir):
911+
parent=git.Repo.init(rwdir)
912+
913+
smp=osp.join(rwdir,"module")
914+
os.mkdir(smp)
915+
916+
withopen(osp.join(smp,"a"),"w",encoding="utf-8")asf:
917+
f.write('test\n')
918+
919+
withopen(osp.join(rwdir,".gitmodules"),"w",encoding="utf-8")asf:
920+
f.write("[submodule\"a\"]\n")
921+
f.write(" path = module\n")
922+
f.write(" url = https://github.com/chaconinc/DbConnector\n")
923+
924+
parent.git.add(Git.polish_url(osp.join(smp,"a")))
925+
parent.git.add(Git.polish_url(osp.join(rwdir,".gitmodules")))
926+
927+
parent.git.commit(message='test')
928+
929+
assertlen(parent.submodules)==0
930+
909931
@with_rw_directory
910932
deftest_remove_norefs(self,rwdir):
911933
parent=git.Repo.init(osp.join(rwdir,"parent"))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp