File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -151,4 +151,18 @@ git clone with-submodules not-a-submodule
151151 git add m1 && git commit -m " no submodule in index and commit, but in configuration"
152152)
153153
154- git init unborn
154+ git init unborn
155+
156+ mkdir symlinked-git-dir
157+ (cd symlinked-git-dir
158+ git init -q r1
159+ (cd r1
160+ git commit -q --allow-empty -m " init"
161+ )
162+
163+ git config -f r1/.git/config core.worktree ` pwd`
164+ ln -s r1/.git .git
165+
166+ git -c protocol.file.allow=always submodule add ../module1 m1
167+ git commit -m " add module 1"
168+ )
Original file line number Diff line number Diff line change @@ -310,6 +310,20 @@ mod index_worktree {
310310 ) ;
311311 }
312312
313+ #[ test]
314+ fn submodule_in_symlinked_dir ( ) -> crate :: Result {
315+ let repo = submodule_repo ( "symlinked-git-dir" ) ?;
316+ let mut status = repo
317+ . status ( gix:: progress:: Discard ) ?
318+ . index_worktree_options_mut ( |opts| {
319+ opts. sorting =
320+ Some ( gix:: status:: plumbing:: index_as_worktree_with_renames:: Sorting :: ByPathCaseSensitive ) ;
321+ } )
322+ . into_index_worktree_iter ( None ) ?;
323+ assert ! ( status. all( |r| r. is_ok( ) ) , "status should not have any errors" ) ;
324+ Ok ( ( ) )
325+ }
326+
313327 #[ test]
314328 fn submodule_modification ( ) -> crate :: Result {
315329 let repo = submodule_repo ( "modified-untracked-and-submodule-head-changed-and-modified" ) ?;
You can’t perform that action at this time.
0 commit comments