From 229084a15b5d44a994f2590b72b143234bfd2866 Mon Sep 17 00:00:00 2001 From: Ryan Shepherd Date: Fri, 6 Sep 2024 18:26:31 -0700 Subject: [PATCH] [File Explorer Integration] Git submodule status and commit log inside submodule (#3745) --- ...FileExplorerGitIntegration.UnitTest.csproj | 9 + .../GitSubmoduleUnitTests.cs | 112 +++++++ .../SandboxHelper.cs | 69 +++++ .../resources/.gitattributes | 5 + .../resources/.gitignore | 4 + .../resources/resources_readme.txt | 3 + .../resources/submodules/README.txt | 3 + .../submodules/dot-git/COMMITMESSAGE | 0 .../resources/submodules/dot-git/HEAD | 1 + .../resources/submodules/dot-git/ORIG_HEAD | 1 + .../resources/submodules/dot-git/config | 34 +++ .../resources/submodules/dot-git/description | 1 + .../resources/submodules/dot-git/index | Bin 0 -> 974 bytes .../resources/submodules/dot-git/info/exclude | 6 + .../resources/submodules/dot-git/info/refs | 1 + .../modules/sm_added_and_uncommitted/HEAD | 1 + .../modules/sm_added_and_uncommitted/config | 14 + .../sm_added_and_uncommitted/description | 1 + .../modules/sm_added_and_uncommitted/index | Bin 0 -> 225 bytes .../sm_added_and_uncommitted/info/exclude | 6 + .../sm_added_and_uncommitted/info/refs | 3 + .../objects/info/commit-graph | Bin 0 -> 1412 bytes .../objects/info/packs | 3 + ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx | Bin 0 -> 1492 bytes ...30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack | Bin 0 -> 1466 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev | Bin 0 -> 112 bytes .../sm_added_and_uncommitted/packed-refs | 3 + .../refs/remotes/origin/HEAD | 1 + .../modules/sm_changed_file/COMMITMESSAGE | 0 .../modules/sm_changed_file/FETCH_HEAD | 1 + .../dot-git/modules/sm_changed_file/HEAD | 1 + .../dot-git/modules/sm_changed_file/ORIG_HEAD | 1 + .../dot-git/modules/sm_changed_file/config | 11 + .../modules/sm_changed_file/description | 1 + .../dot-git/modules/sm_changed_file/index | Bin 0 -> 225 bytes .../modules/sm_changed_file/info/exclude | 6 + .../dot-git/modules/sm_changed_file/info/refs | 2 + .../sm_changed_file/objects/info/commit-graph | Bin 0 -> 1412 bytes .../sm_changed_file/objects/info/packs | 3 + ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx | Bin 0 -> 1492 bytes ...30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack | Bin 0 -> 1466 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev | Bin 0 -> 112 bytes .../modules/sm_changed_file/packed-refs | 3 + .../modules/sm_changed_head/COMMITMESSAGE | 0 .../modules/sm_changed_head/COMMIT_EDITMSG | 1 + .../modules/sm_changed_head/FETCH_HEAD | 1 + .../dot-git/modules/sm_changed_head/HEAD | 1 + .../dot-git/modules/sm_changed_head/ORIG_HEAD | 1 + .../dot-git/modules/sm_changed_head/config | 11 + .../modules/sm_changed_head/description | 1 + .../dot-git/modules/sm_changed_head/index | Bin 0 -> 225 bytes .../modules/sm_changed_head/info/exclude | 6 + .../dot-git/modules/sm_changed_head/info/refs | 2 + .../sm_changed_head/objects/info/commit-graph | Bin 0 -> 1472 bytes .../sm_changed_head/objects/info/packs | 3 + ...01333783142a88b5199747b1d4aa993fd8df68.idx | Bin 0 -> 1688 bytes ...1333783142a88b5199747b1d4aa993fd8df68.pack | Bin 0 -> 2129 bytes ...01333783142a88b5199747b1d4aa993fd8df68.rev | Bin 0 -> 140 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes .../modules/sm_changed_head/packed-refs | 3 + .../modules/sm_changed_index/COMMITMESSAGE | 0 .../modules/sm_changed_index/FETCH_HEAD | 1 + .../dot-git/modules/sm_changed_index/HEAD | 1 + .../modules/sm_changed_index/ORIG_HEAD | 1 + .../dot-git/modules/sm_changed_index/config | 11 + .../modules/sm_changed_index/description | 1 + .../dot-git/modules/sm_changed_index/index | Bin 0 -> 206 bytes .../modules/sm_changed_index/info/exclude | 6 + .../modules/sm_changed_index/info/refs | 2 + .../objects/info/commit-graph | Bin 0 -> 1412 bytes .../sm_changed_index/objects/info/packs | 3 + ...77343301131983b67a949d28b0995936863afe.idx | Bin 0 -> 1520 bytes ...7343301131983b67a949d28b0995936863afe.pack | Bin 0 -> 1505 bytes ...77343301131983b67a949d28b0995936863afe.rev | Bin 0 -> 116 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes .../modules/sm_changed_index/packed-refs | 3 + .../sm_changed_untracked_file/COMMITMESSAGE | 0 .../sm_changed_untracked_file/FETCH_HEAD | 1 + .../modules/sm_changed_untracked_file/HEAD | 1 + .../sm_changed_untracked_file/ORIG_HEAD | 1 + .../modules/sm_changed_untracked_file/config | 11 + .../sm_changed_untracked_file/description | 1 + .../modules/sm_changed_untracked_file/index | Bin 0 -> 206 bytes .../sm_changed_untracked_file/info/exclude | 6 + .../sm_changed_untracked_file/info/refs | 2 + .../objects/info/commit-graph | Bin 0 -> 1412 bytes .../objects/info/packs | 3 + ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx | Bin 0 -> 1492 bytes ...30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack | Bin 0 -> 1466 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev | Bin 0 -> 112 bytes .../sm_changed_untracked_file/packed-refs | 3 + .../modules/sm_missing_commits/FETCH_HEAD | 1 + .../dot-git/modules/sm_missing_commits/HEAD | 1 + .../modules/sm_missing_commits/ORIG_HEAD | 1 + .../dot-git/modules/sm_missing_commits/config | 11 + .../modules/sm_missing_commits/description | 1 + .../dot-git/modules/sm_missing_commits/index | Bin 0 -> 225 bytes .../modules/sm_missing_commits/info/exclude | 6 + .../modules/sm_missing_commits/info/refs | 2 + .../objects/info/commit-graph | Bin 0 -> 1412 bytes .../sm_missing_commits/objects/info/packs | 3 + ...f76f1544d89a1d743260bac56cb63a5d2e5f89.idx | Bin 0 -> 1492 bytes ...76f1544d89a1d743260bac56cb63a5d2e5f89.pack | Bin 0 -> 1465 bytes ...f76f1544d89a1d743260bac56cb63a5d2e5f89.rev | Bin 0 -> 112 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes .../modules/sm_missing_commits/packed-refs | 3 + .../sm_missing_commits_detached/FETCH_HEAD | 1 + .../modules/sm_missing_commits_detached/HEAD | 1 + .../sm_missing_commits_detached/ORIG_HEAD | 1 + .../sm_missing_commits_detached/config | 14 + .../sm_missing_commits_detached/description | 1 + .../modules/sm_missing_commits_detached/index | Bin 0 -> 225 bytes .../sm_missing_commits_detached/info/exclude | 6 + .../sm_missing_commits_detached/info/refs | 2 + .../objects/info/commit-graph | Bin 0 -> 1412 bytes .../objects/info/packs | 3 + ...f76f1544d89a1d743260bac56cb63a5d2e5f89.idx | Bin 0 -> 1492 bytes ...76f1544d89a1d743260bac56cb63a5d2e5f89.pack | Bin 0 -> 1465 bytes ...f76f1544d89a1d743260bac56cb63a5d2e5f89.rev | Bin 0 -> 112 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes .../sm_missing_commits_detached/packed-refs | 3 + .../dot-git/modules/sm_unchanged/FETCH_HEAD | 1 + .../dot-git/modules/sm_unchanged/HEAD | 1 + .../dot-git/modules/sm_unchanged/config | 14 + .../modules/sm_unchanged/config.backup | 11 + .../dot-git/modules/sm_unchanged/description | 1 + .../dot-git/modules/sm_unchanged/index | Bin 0 -> 225 bytes .../dot-git/modules/sm_unchanged/info/exclude | 6 + .../dot-git/modules/sm_unchanged/info/refs | 2 + .../sm_unchanged/objects/info/commit-graph | Bin 0 -> 1412 bytes .../modules/sm_unchanged/objects/info/packs | 3 + ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx | Bin 0 -> 1492 bytes ...30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack | Bin 0 -> 1466 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev | Bin 0 -> 112 bytes .../dot-git/modules/sm_unchanged/packed-refs | 3 + .../modules/sm_unchanged_detached/FETCH_HEAD | 1 + .../modules/sm_unchanged_detached/HEAD | 1 + .../modules/sm_unchanged_detached/config | 14 + .../modules/sm_unchanged_detached/description | 1 + .../modules/sm_unchanged_detached/index | Bin 0 -> 225 bytes .../sm_unchanged_detached/info/exclude | 6 + .../modules/sm_unchanged_detached/info/refs | 2 + .../objects/info/commit-graph | Bin 0 -> 1412 bytes .../sm_unchanged_detached/objects/info/packs | 3 + ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx | Bin 0 -> 1492 bytes ...30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack | Bin 0 -> 1466 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev | Bin 0 -> 112 bytes .../modules/sm_unchanged_detached/packed-refs | 3 + .../dot-git/objects/info/commit-graph | Bin 0 -> 1292 bytes .../submodules/dot-git/objects/info/packs | 3 + ...070ee5deec36e3d78ff2b8c5ea26e01e751199.idx | Bin 0 -> 1380 bytes ...ee5deec36e3d78ff2b8c5ea26e01e751199.mtimes | Bin 0 -> 96 bytes ...70ee5deec36e3d78ff2b8c5ea26e01e751199.pack | Bin 0 -> 559 bytes ...070ee5deec36e3d78ff2b8c5ea26e01e751199.rev | Bin 0 -> 96 bytes ...6fc56e876eba853e5d5e1cfdb2dcd012ae2cee.idx | Bin 0 -> 1380 bytes ...fc56e876eba853e5d5e1cfdb2dcd012ae2cee.pack | Bin 0 -> 1348 bytes ...6fc56e876eba853e5d5e1cfdb2dcd012ae2cee.rev | Bin 0 -> 96 bytes .../resources/submodules/dot-git/packed-refs | 2 + .../resources/submodules/dot-gitmodules | 30 ++ .../sm_added_and_uncommitted/README.txt | 1 + .../sm_added_and_uncommitted/dot-git | 1 + .../sm_added_and_uncommitted/file_to_modify | 3 + .../submodules/sm_changed_file/README.txt | 1 + .../submodules/sm_changed_file/dot-git | 1 + .../submodules/sm_changed_file/file_to_modify | 4 + .../submodules/sm_changed_head/README.txt | 1 + .../submodules/sm_changed_head/dot-git | 1 + .../submodules/sm_changed_head/file_to_modify | 4 + .../submodules/sm_changed_index/README.txt | 1 + .../submodules/sm_changed_index/dot-git | 1 + .../sm_changed_index/file_to_modify | 4 + .../sm_changed_untracked_file/README.txt | 1 + .../sm_changed_untracked_file/dot-git | 1 + .../file_is_untracked | 1 + .../sm_changed_untracked_file/file_to_modify | 3 + .../submodules/sm_missing_commits/README.txt | 1 + .../submodules/sm_missing_commits/dot-git | 1 + .../sm_missing_commits/file_to_modify | 2 + .../sm_missing_commits_detached/README.txt | 1 + .../sm_missing_commits_detached/dot-git | 1 + .../file_to_modify | 2 + .../submodules/sm_unchanged/README.txt | 1 + .../resources/submodules/sm_unchanged/dot-git | 1 + .../submodules/sm_unchanged/file_to_modify | 3 + .../sm_unchanged_detached/README.txt | 1 + .../submodules/sm_unchanged_detached/dot-git | 1 + .../sm_unchanged_detached/file_to_modify | 3 + .../resources/submodules_target/README.txt | 1 + .../submodules_target/dot-git/COMMITMESSAGE | 0 .../resources/submodules_target/dot-git/HEAD | 1 + .../submodules_target/dot-git/config | 7 + .../submodules_target/dot-git/description | 1 + .../resources/submodules_target/dot-git/index | Bin 0 -> 225 bytes .../submodules_target/dot-git/info/exclude | 6 + .../submodules_target/dot-git/info/refs | 1 + .../dot-git/objects/info/commit-graph | Bin 0 -> 1412 bytes .../dot-git/objects/info/packs | 3 + ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx | Bin 0 -> 1100 bytes ...7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes | Bin 0 -> 56 bytes ...1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack | Bin 0 -> 41 bytes ...b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev | Bin 0 -> 56 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx | Bin 0 -> 1492 bytes ...30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack | Bin 0 -> 1466 bytes ...a30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev | Bin 0 -> 112 bytes .../submodules_target/dot-git/packed-refs | 2 + .../submodules_target/file_to_modify | 3 + .../Models/CommitLogCache.cs | 19 +- .../Models/GitLocalRepository.cs | 2 +- .../Models/GitRepositoryStatus.cs | 18 +- .../Models/RepositoryWrapper.cs | 70 ++++- .../Models/StatusCache.cs | 284 +++++++++++++----- .../Strings/en-us/Resources.resw | 28 ++ 244 files changed, 974 insertions(+), 86 deletions(-) create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/GitSubmoduleUnitTests.cs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/SandboxHelper.cs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitattributes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitignore create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/resources_readme.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/COMMITMESSAGE create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/ORIG_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/refs/remotes/origin/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/COMMITMESSAGE create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/ORIG_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/COMMITMESSAGE create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/COMMIT_EDITMSG create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/ORIG_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-9201333783142a88b5199747b1d4aa993fd8df68.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-9201333783142a88b5199747b1d4aa993fd8df68.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-9201333783142a88b5199747b1d4aa993fd8df68.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/COMMITMESSAGE create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/ORIG_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-2077343301131983b67a949d28b0995936863afe.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-2077343301131983b67a949d28b0995936863afe.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-2077343301131983b67a949d28b0995936863afe.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/COMMITMESSAGE create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/ORIG_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/ORIG_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/ORIG_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/config.backup create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/FETCH_HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-dc6fc56e876eba853e5d5e1cfdb2dcd012ae2cee.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-dc6fc56e876eba853e5d5e1cfdb2dcd012ae2cee.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-dc6fc56e876eba853e5d5e1cfdb2dcd012ae2cee.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-gitmodules create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_is_untracked create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/dot-git create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/file_to_modify create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/README.txt create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/COMMITMESSAGE create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/HEAD create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/config create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/description create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/index create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/info/exclude create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/info/refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/info/commit-graph create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/info/packs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.mtimes create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.idx create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/packed-refs create mode 100644 extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/file_to_modify diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/FileExplorerGitIntegration.UnitTest.csproj b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/FileExplorerGitIntegration.UnitTest.csproj index 14e0edf08e..860681a3ae 100644 --- a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/FileExplorerGitIntegration.UnitTest.csproj +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/FileExplorerGitIntegration.UnitTest.csproj @@ -19,4 +19,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/GitSubmoduleUnitTests.cs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/GitSubmoduleUnitTests.cs new file mode 100644 index 0000000000..ab6011f6f7 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/GitSubmoduleUnitTests.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using FileExplorerGitIntegration.Models; + +namespace FileExplorerGitIntegration.UnitTest; + +[TestClass] +public class GitSubmoduleUnitTests +{ + private const string FolderStatusProp = "System.VersionControl.CurrentFolderStatus"; + private const string StatusProp = "System.VersionControl.Status"; + private const string ShaProp = "System.VersionControl.LastChangeID"; + + private static SandboxHelper? _sandbox; + private static GitLocalRepository? _repo; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + _sandbox = new(); + var repoPath = _sandbox.CreateSandbox("submodules"); + _sandbox.CreateSandbox("submodules_target"); + _repo = new GitLocalRepository(repoPath); + } + + [ClassCleanup] + public static void ClassCleanup() + { + if (_sandbox is not null) + { + _sandbox.Cleanup(); + _sandbox = null; + } + + _repo = null; + } + + [TestMethod] + [DataRow("", FolderStatusProp, "Branch: main | +1 ~1 -0 | +0 ~7 -0")] + [DataRow(".gitmodules", StatusProp, "Staged, Modified")] + [DataRow("README.txt", StatusProp, "")] + [DataRow("sm_added_and_uncommitted", StatusProp, "Submodule Added")] + [DataRow("sm_changed_file", StatusProp, "Submodule Dirty")] + [DataRow("sm_changed_head", StatusProp, "Submodule Changed")] + [DataRow("sm_changed_index", StatusProp, "Submodule Dirty")] + [DataRow("sm_changed_untracked_file", StatusProp, "Submodule Dirty")] + [DataRow("sm_missing_commits", StatusProp, "Submodule Changed")] + [DataRow("sm_missing_commits_detached", StatusProp, "Submodule Changed")] + [DataRow("sm_unchanged", StatusProp, "")] + [DataRow("sm_unchanged_detached", StatusProp, "")] + public void RootFolderStatus(string path, string property, string value) + { + Assert.IsNotNull(_repo); + var result = _repo.GetProperties([property], path); + Assert.IsNotNull(result); + Assert.AreEqual(value, result[property]); + } + + [TestMethod] + [DataRow("", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow(".gitmodules", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")] + [DataRow("README.txt", ShaProp, "74b157c3bfd2f24323c3bc6e5e96639a424f157f")] + [DataRow("sm_added_and_uncommitted", ShaProp, "")] + [DataRow("sm_changed_file", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow("sm_changed_head", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow("sm_changed_index", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow("sm_changed_untracked_file", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow("sm_missing_commits", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow("sm_missing_commits_detached", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow("sm_unchanged", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + [DataRow("sm_unchanged_detached", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")] + public void RootFolderCommit(string path, string property, string value) + { + Assert.IsNotNull(_repo); + var result = _repo.GetProperties([property], path); + Assert.IsNotNull(result); + if (result.TryGetValue(property, out var actual)) + { + Assert.AreEqual(value, actual); + } + else + { + Assert.AreEqual(value, string.Empty); + } + } + + [TestMethod] + [DataRow("sm_added_and_uncommitted\\file_to_modify", ShaProp, "e9a899083a7e2b25d7a41e69463ce083bf9ef6ef")] + [DataRow("sm_changed_file\\file_to_modify", ShaProp, "e9a899083a7e2b25d7a41e69463ce083bf9ef6ef")] + [DataRow("sm_changed_head\\file_to_modify", ShaProp, "2ab664114c928551863c33d694965c79b6b75144")] + [DataRow("sm_changed_index\\file_to_modify", ShaProp, "e9a899083a7e2b25d7a41e69463ce083bf9ef6ef")] + [DataRow("sm_changed_untracked_file\\file_to_modify", ShaProp, "e9a899083a7e2b25d7a41e69463ce083bf9ef6ef")] + [DataRow("sm_missing_commits\\file_to_modify", ShaProp, "8e623bcf5aeceb8af7c0f0b22b82322f6c82fd4b")] + [DataRow("sm_missing_commits_detached\\file_to_modify", ShaProp, "8e623bcf5aeceb8af7c0f0b22b82322f6c82fd4b")] + [DataRow("sm_unchanged\\file_to_modify", ShaProp, "e9a899083a7e2b25d7a41e69463ce083bf9ef6ef")] + [DataRow("sm_unchanged_detached\\file_to_modify", ShaProp, "e9a899083a7e2b25d7a41e69463ce083bf9ef6ef")] + public void SubmoduleFilesCommit(string path, string property, string value) + { + Assert.IsNotNull(_repo); + var result = _repo.GetProperties([property], path); + Assert.IsNotNull(result); + if (result.TryGetValue(property, out var actual)) + { + Assert.AreEqual(value, actual); + } + else + { + Assert.AreEqual(value, string.Empty); + } + } +} diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/SandboxHelper.cs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/SandboxHelper.cs new file mode 100644 index 0000000000..55019279d9 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/SandboxHelper.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Serilog; + +namespace FileExplorerGitIntegration.UnitTest; + +internal sealed class SandboxHelper +{ + private readonly Serilog.ILogger _log = Log.ForContext("SourceContext", nameof(SandboxHelper)); + + private readonly Dictionary _renames = new() + { + { "dot-git", ".git" }, + { "dot-gitmodules", ".gitmodules" }, + }; + + public DirectoryInfo ResourcesDirectory { get; private set; } + + public DirectoryInfo DeployedDirectory { get; private set; } + + public SandboxHelper() + { + var parentDir = Directory.GetParent(typeof(SandboxHelper).Assembly.Location) ?? throw new InvalidOperationException("Could not obtain resources directory for sandbox repos"); + ResourcesDirectory = new DirectoryInfo(Path.Combine(parentDir.FullName, "resources")); + DeployedDirectory = Directory.CreateTempSubdirectory("SandboxHelper."); + } + + public void Cleanup() + { + try + { + Directory.Delete(DeployedDirectory.FullName, true); + } + catch (Exception ex) + { + _log.Warning(ex, $"Failed to delete temp directory {DeployedDirectory.FullName}"); + throw; + } + } + + public string CreateSandbox(string directory) + { + var source = new DirectoryInfo(Path.Combine(ResourcesDirectory.FullName, directory)); + var target = new DirectoryInfo(Path.Combine(DeployedDirectory.FullName, directory)); + CopyRecursive(source, target); + + return target.FullName; + } + + private void CopyRecursive(DirectoryInfo source, DirectoryInfo target) + { + foreach (var dir in source.GetDirectories()) + { + CopyRecursive(dir, target.CreateSubdirectory(FixName(dir.Name))); + } + + foreach (var file in source.GetFiles()) + { + file.CopyTo(Path.Combine(target.FullName, FixName(file.Name))); + } + } + + private string FixName(string name) + { + _renames.TryGetValue(name, out var newName); + return newName ?? name; + } +} diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitattributes b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitattributes new file mode 100644 index 0000000000..16986b4433 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitattributes @@ -0,0 +1,5 @@ +* binary +.gitattributes diff +.gitignore diff +config diff +resources_readme.txt diff diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitignore b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitignore new file mode 100644 index 0000000000..a817cf846c --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/.gitignore @@ -0,0 +1,4 @@ +COMMIT_EDITMSG +exclude +logs/ +description diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/resources_readme.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/resources_readme.txt new file mode 100644 index 0000000000..3807fc1f84 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/resources_readme.txt @@ -0,0 +1,3 @@ +The folders under "resources" are Git repositories that have had ".git" renamed to "dot-git" and ".gitmodules" renamed to "dot-gitmodules". + +This makes Git treat them as normal files so they can be checked in. SandboxHelper will rename them back to ".git" and ".gitmodules" when it needs to "clone" the repos for testing. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/README.txt new file mode 100644 index 0000000000..a24ee880a8 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/README.txt @@ -0,0 +1,3 @@ +This is a submodule test repo. +It has various submodules in different states. +Inspired by unit tests in libgit2. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/COMMITMESSAGE b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/COMMITMESSAGE new file mode 100644 index 0000000000..e69de29bb2 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/HEAD new file mode 100644 index 0000000000..638398fea2 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/ORIG_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/ORIG_HEAD new file mode 100644 index 0000000000..87d28f9a38 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/ORIG_HEAD @@ -0,0 +1 @@ +3e1e770f7c28e87cbb3ee0c1541e3417c84a0708 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/config b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/config new file mode 100644 index 0000000000..f209c6addb --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/config @@ -0,0 +1,34 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true +[submodule "sm_changed_file"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_missing_commits"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_changed_head"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_changed_index"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_changed_untracked_file"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_unchanged"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_unchanged_detached"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_missing_commits_detached"] + url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target + active = true +[submodule "sm_added_and_uncommitted"] + url = E:/temp/resources/submodules_target + active = true diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/description b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/description new file mode 100644 index 0000000000..893e5cad24 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/index b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/index new file mode 100644 index 0000000000000000000000000000000000000000..905f4c108a46fa8d6d7de2d7ca028a9640f35b63 GIT binary patch literal 974 zcmZ?q402{*U|<4b?z9_w4)EwiKS{f>|GuKD#uT6!6f`b@u^1Sb{Uw5LOR4tpZC${t z;~yBb&@5&8!s!g$dg+-Zx%nxjIjO}^#c9{`-IOkg^b=51WD1qq%xsQe8zYB=wDqQyjCeFa{0Ko*Z zx(^zyf3+uOfBN3_{*w+rp6ITneuqJ#I5$2qB_%Z_J~1yPzBDg6KQ}kCq$D+kfdS}F zcg5Yy_oUs}`JdCMs{vuy0|XPu!fGx*(A?yV#JqH%$!VE6sX%og^OTbNdVt~BCG~^r z2*QvD2qut4(7cS)M45OmpK?QcDt(GeA)f1|WBSU4a22k50;7RqP|&yp#sbnN&c>&H&A58#-%^y zf*H7iTpe9}UG+*TN?>YX=78yjPg`K(3=Amdr6eBB`XmzY&u;lgiJraUeHVh9-Srvx z(lT>W<4f}6bMsR&(<(uFLxNmgfs`bJk%9r2hTMI>PbY3A8$FzGH7!l-*RvH#nzLUY XS|?f{%eQ~Q!a0m8!CT+#-Jb^l4a`do literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/exclude b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/exclude new file mode 100644 index 0000000000..a5196d1be8 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/refs new file mode 100644 index 0000000000..7b89c2baeb --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/info/refs @@ -0,0 +1,3 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/HEAD +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/info/commit-graph b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/info/commit-graph new file mode 100644 index 0000000000000000000000000000000000000000..e0b221014fb90d23d35c19e6604957586168d43c GIT binary patch literal 1412 zcmZ>E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyF7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HSj_zd z7GrmT#p635dm*rRDh2WbfwVJ_4~$!8AkESW$y1Epz#_8;$X*Tkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB!c%# zzFZM%-SS6?b?Ku^OYZ!ca%s+$Bvn?6Xhn5n{oN7#44+;Jb8TU(n8Vv+$k$-N!(6WN z?}7LS{xY#+7nYa=-S+Uc{!pz{xv}*5>J`dPC!$y{U+6KdzrYvoKPB{Nf33ATm*t&V z3Ue|acYod1>LPnY=8?b>r@vEooOz+7BXfcOyn*7w1*{cwj7R%y5-CqV7jSk z1*VlVTfAD&*t9;nq@u9gM15;S|Mc$Z+zg%%`OKFAbzsIR*0ASe_$$T$NbxW S{;ql@W`F5tA>RinhVuY=rLE=w literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev new file mode 100644 index 0000000000000000000000000000000000000000..da062a9bef53a5041991f4b3011eb0aa9645b94d GIT binary patch literal 112 zcmWIYbctYKU|@t|E+EYd#N0s41jIZ*%nrmHK+FupAixU5oIniH!w1A{K+N)gF&D@D q+kgJ9dL?Fm>1QF|2Pua0%h#92F!V0{re2o!MC$J<^{emSTn7Mf;uwPf literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/packed-refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/packed-refs new file mode 100644 index 0000000000..2d08bcc8b1 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/packed-refs @@ -0,0 +1,3 @@ +# pack-refs with: peeled fully-peeled sorted +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/refs/remotes/origin/HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/refs/remotes/origin/HEAD new file mode 100644 index 0000000000..4b0a875958 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_added_and_uncommitted/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/COMMITMESSAGE b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/COMMITMESSAGE new file mode 100644 index 0000000000..e69de29bb2 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/FETCH_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/FETCH_HEAD new file mode 100644 index 0000000000..cf9cca57e8 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/FETCH_HEAD @@ -0,0 +1 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/HEAD new file mode 100644 index 0000000000..638398fea2 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/HEAD @@ -0,0 +1 @@ +ref: refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/ORIG_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/ORIG_HEAD new file mode 100644 index 0000000000..d4581f1bae --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/ORIG_HEAD @@ -0,0 +1 @@ +e9a899083a7e2b25d7a41e69463ce083bf9ef6ef diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/config b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/config new file mode 100644 index 0000000000..6d80d0295e --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true + worktree = ../../../sm_changed_file +[remote "origin"] + url = ../../submodules_target + fetch = +refs/heads/*:refs/remotes/origin/* diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/description b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/description new file mode 100644 index 0000000000..893e5cad24 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/index b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/index new file mode 100644 index 0000000000000000000000000000000000000000..43ac442aed3c8a6fb0aeaf534f218b94199f1fe0 GIT binary patch literal 225 zcmZ?q402{*U|<5_v>Tgm^S#nafzd!QC}>;)V*zOsXX8`9W?Vh_O~tuDG<>r`E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyF7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HSj_zd z7GrmT#p635dm*rRDh2WbfwVJ_4~$!8AkESW$y1Epz#_8;$X*Tkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB!c%# zzFZM%-SS6?b?Ku^OYZ!ca%s+$Bvn?6Xhn5n{oN7#44+;Jb8TU(n8Vv+$k$-N!(6WN z?}7LS{xY#+7nYa=-S+Uc{!pz{xv}*5>J`dPC!$y{U+6KdzrYvoKPB{Nf33ATm*t&V z3Ue|acYod1>LPnY=8?b>r@vEooOz+7BXfcOyn*7w1*{cwj7R%y5-CqV7jSk z1*VlVTfAD&*t9;nq@u9gM15;S|Mc$Z+zg%%`OKFAbzsIR*0ASe_$$T$NbxW S{;ql@W`F5tA>RinhVuY=rLE=w literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev new file mode 100644 index 0000000000000000000000000000000000000000..da062a9bef53a5041991f4b3011eb0aa9645b94d GIT binary patch literal 112 zcmWIYbctYKU|@t|E+EYd#N0s41jIZ*%nrmHK+FupAixU5oIniH!w1A{K+N)gF&D@D q+kgJ9dL?Fm>1QF|2Pua0%h#92F!V0{re2o!MC$J<^{emSTn7Mf;uwPf literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/packed-refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/packed-refs new file mode 100644 index 0000000000..2d08bcc8b1 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_file/packed-refs @@ -0,0 +1,3 @@ +# pack-refs with: peeled fully-peeled sorted +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/COMMITMESSAGE b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/COMMITMESSAGE new file mode 100644 index 0000000000..e69de29bb2 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/COMMIT_EDITMSG b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/COMMIT_EDITMSG new file mode 100644 index 0000000000..69c80d9174 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/COMMIT_EDITMSG @@ -0,0 +1 @@ +Committing a change to submodule diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/FETCH_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/FETCH_HEAD new file mode 100644 index 0000000000..cf9cca57e8 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/FETCH_HEAD @@ -0,0 +1 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/HEAD new file mode 100644 index 0000000000..b870d82622 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/HEAD @@ -0,0 +1 @@ +ref: refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/ORIG_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/ORIG_HEAD new file mode 100644 index 0000000000..a306ccd25b --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/ORIG_HEAD @@ -0,0 +1 @@ +4bb90658751b1d839ee1277368998be69deacca5 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/config b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/config new file mode 100644 index 0000000000..3c6a531512 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true + worktree = ../../../sm_changed_head +[remote "origin"] + url = ../../submodules_target + fetch = +refs/heads/*:refs/remotes/origin/* diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/description b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/description new file mode 100644 index 0000000000..893e5cad24 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/index b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/index new file mode 100644 index 0000000000000000000000000000000000000000..98f1002dfdb48d38d1f7b36ffd68a5edf5c81e0b GIT binary patch literal 225 zcmZ?q402{*U|<5_v>RIt)Y6RZz-XWt6f`b@v4FIRv+=24Gp?Ters7;68ot?}ap_OF zUE5Aa}QWMT04ba7*V02d(J2f}1=advSGfwK3wyEqy_*sN0^G>BwfgJ2H`ixFrm zv6u;{b`%e67%&6l0EStB?2(39fqotc%m%cVCRl!XfRL2@g`VFhnLMAUJ}&uSpcbLE zEk)30QfpwFjq$Z9(_$*OZ4Y$mK4`T5)t;FB>3i4vPdfZ~qPv#*oxUXN^HFbJcYQzb zVUu=~k$z6oU+>e04onh=)6Y0`Pc1DfL~i+YzVk{iSIp$Fs?%1zzCf=E}8w}^uX=YsVIcY)GV0gwO!j zg>yHGdUaf$YJG`G9VNVSXT+5-b4JPYo;xG>2YT2xu2QurSabWGn*Y!>}lj zO)3@x>cNVI8`YOis-Do~_$#-|Jp17Br6o&#NpS8;Un#AUzvkU_`SMMP8j;6-uuB#n z(D6FBOyMqlXi& zrlpDfdbT1-Q)^p_pwFb%z&0D>Yg4AhRBqcI=wkZuzmeJ>N2aFb&z{Ub@I~YN?}}+Q zcVm8ikp2?-z@UoV=B#rwctr|yPwT{b!KVe(X3A*0srilf0XFiE8ce@$k|;# z#aP2_CU@#e;oOa)UftP8CTF~M>^^9;{?(qC{powx`%gOjc%r+O`klTc>+?}>UUz*z z@L`j7laYQ-(_im-{|{KK<$0g+b9%4%p2drIL`%G4*`TQVI=IS0Q@Cfr(bKbkXbCL2 zn0xxrfk^^!`Wc7rsij4Q$SuFlcV6jfAfx#V6|pX%FNPOiNG_bdPvwaI%M~*@tm?E? zuP>3ybhCNTyno)e_iui>Km6z(q#)82F&?0#t$-!3uZq)ZLH?~=h;QIi&Ht3I_%C?)@<+5pL2h=yw15NLgm>! zA#S=%KCfBV?CcIP;pF-{H`r6DtnF=3jFf4Z-#^3VNy|DluPpgkbk=_ou$VmpEILbo z#W=7WWL^N|#{kpLAz+aSET7mkfO5BhMfL%p7>K_G$d>`C{R6B@{sP6n0*mSjAZ-T} z+W{1d1j;u9#V$-@G&XM*(dyVLIo*BZl~ptCZ`{wQG@P^Y$29ZC`w|eEtO~-sS=^J#?nwyOSP$qh_z_7LEA^0Nn5p5>=KN< z3{ys|)i%`9iZz2SOo_pC8KWg-hGNp2b8~vm)AP*5d-;Bs&-42d?T@(u03a!Tush0h zPHvi4^kcZP!>(1|>F-sLt>)fpj&BuNP$XX!IY~bIX?%LXE9qMJRjSikHC9DdQ_)GT zBAyZ|>K}10a)#Je?t4npEH5m7dDry~TE-G)EXUk1@-TBC99w-ts>d>p9aZ-qA3q-z zvs)&ai44qx37d;!N893sq>Z9Y=DS4DuQ4_uT}-8AE-CcB*#kcQ&u*)8HTct4wsnw; za(g(nHlVz?&28C;^ntch6JVf(xUeFXY)R)tkT>~<%QA<1dw2o?ZGLYA4t>o28E=M{ zoXWStW3kPZ`WRFY!V6*bjX4VETc&@etlh#Gi?6aU%mo7hM$rB&ar@%5pxck(8jiC; zeQnoZQ0Pa-A%!8x5!3g-1xTgCzSW^_s8MAWZHuKgMAF3If(754mp`2VqwJG1dTrNYv0==K|UrPaa};ye=kcK;z99<_G=D4N(-!@GcX5 z$n!-#T&$4e65JGw3HE%BAQ;Joh+d49orrqBDUe@DX-k=wZM!&ci_7cacAgxMsO9fJ z)%)tk9c5u~MavSGUq86Jv(!PtDG^_(QFhSU(=LNcGExcd8O0EBM*gs34_d)am{k2< z5^jx;)gj?c*fssMID-!%5cWjDs{{^P0)kEg!9}jP{-+Rus#!r=hsxcxK2* z!yhf8h#&d;X=9K=oa(6_e$b9e2JiSNXX8uO^Kt|ozE40j+o{K5k~}V zSTRvRT>a$$IYhf8hv%VPrE1_C4x1_AT>FKcwG^f<;Tm$$E3(NfQI8uPd_1~oBt0GT zO+H24()v<@X{CWzPa!g~Otsp<-{`x!7uKfQ=X+yaDSuY9#M3YTr8sJmlv^Sc$mo1* zZK!RlP{Y-<26a2FY8>S#dupf*H%`}??5;1BVD4(mhg?bdOTsqTnZO2r251lIfh*gM z<7x`PwB#N;=(jVSlTdiEoW8f_5worbI0k>0g<{Aa7`>736U@rGB8qFQ%wk(bT(qPv zoxFvq6J-fxY#xR&L(3Y*{N@g2%(&;0Vt z!M~1n)q`iV;Qn&RdC|$C zz&vS*v*_GRGHe{x2M=-BuG(3jN=kLn)9nlz&F6LjSD{v^--GBJj0GBvG53;Y?YkuzVXVcnf5pCXGnctF!$59L-&qmKQ0q}6C3vF HQcEQOhPN0E literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_head/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx new file mode 100644 index 0000000000000000000000000000000000000000..160df578df1d2662d38664e81e589ea8e7ed901d GIT binary patch literal 1100 zcmexg;-AdGz`z8=qk#AjU<4{1#iL;`Y|?;tQ|vLP(|J1=Bs}&0acxq^?{}UohqgII z0Mj|o<&E3Vr>!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyFRJ83>Vufz-XWt6f`b@v4FIRv+=24Gp?Ters7;68ot?}ap_OF zUWtc0N-IajsO4v literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/exclude b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/exclude new file mode 100644 index 0000000000..f006809736 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/refs new file mode 100644 index 0000000000..d904244d54 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/info/refs @@ -0,0 +1,2 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/info/commit-graph b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/info/commit-graph new file mode 100644 index 0000000000000000000000000000000000000000..e0b221014fb90d23d35c19e6604957586168d43c GIT binary patch literal 1412 zcmZ>E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<yV6%mtK_eFcU``GQ=&%Xu^;U6%L9a@kN%wdyXAGHTU^#2bvyT6 zm&xb#v&wBgAtsz$K`~OM&6AdOYF=6L5m>Y-0E;SM`NsGTSQPF6vgZKBDu8qrkPl32 z%+5eQFuqyV0OK8)_ZYo_#c2kt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB!c%# zzFZM%-SS6?b?Ku^OYZ!ca%s+$Bvn?6Xhn5n{oN7#44+;JbM4@)nB&^Jk?XJnkMnn@ ze~$4N-g|u4lf4@;-P$9k<9*woT3;^Riiu0rZL_(baC+VDcy}W<+VUcg;XTb`$9DK{ zcXyxa@WW5#@?VS3zdtp)@+_M5z)>eOCpAn=V&xT{vp$Q%>(tjx)6@PczwPwDx2m5R zXZ<%}Sio8_$JoTcz}PU5qo}mxW9e1xl^Tf!W_Dk*k6oR7KV%NK%VBeA6TQEh;yE0F zQ>V?GEEPXVe*WzFlV*mUoKRu%da}m>``u6FRja;reUIfRD!b0kFh4>*I<>*KV$SS? zGmI2j8CW+me!_0ghMm%%UpIf5eu14W^o?2i+}V=%_ut7Q)}9^5JxoVb+-0y>Y42x#V2c$HVRLt?-I6r}(fq4UCF-6uq z5cphp*>k9uJ_Rm?x)^?0YsJxL-tP#n|6AZi9M-*op|j5!}_%V{vs5A literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_index/objects/pack/pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.idx new file mode 100644 index 0000000000000000000000000000000000000000..160df578df1d2662d38664e81e589ea8e7ed901d GIT binary patch literal 1100 zcmexg;-AdGz`z8=qk#AjU<4{1#iL;`Y|?;tQ|vLP(|J1=Bs}&0acxq^?{}UohqgII z0Mj|o<&E3Vr>!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyFQ9vOcqO~z-XWt6f`b@v4FIRv+=24Gp?Ters7;68ot?}ap_OF zU-p{~d?!TGuBTdy&7P0}6K7yRF)tI$UT7<3I447g$&EDm13_vcqrhl3fv L_E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyF7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HSj_zd z7GrmT#p635dm*rRDh2WbfwVJ_4~$!8AkESW$y1Epz#_8;$X*Tkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB!c%# zzFZM%-SS6?b?Ku^OYZ!ca%s+$Bvn?6Xhn5n{oN7#44+;Jb8TU(n8Vv+$k$-N!(6WN z?}7LS{xY#+7nYa=-S+Uc{!pz{xv}*5>J`dPC!$y{U+6KdzrYvoKPB{Nf33ATm*t&V z3Ue|acYod1>LPnY=8?b>r@vEooOz+7BXfcOyn*7w1*{cwj7R%y5-CqV7jSk z1*VlVTfAD&*t9;nq@u9gM15;S|Mc$Z+zg%%`OKFAbzsIR*0ASe_$$T$NbxW S{;ql@W`F5tA>RinhVuY=rLE=w literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev new file mode 100644 index 0000000000000000000000000000000000000000..da062a9bef53a5041991f4b3011eb0aa9645b94d GIT binary patch literal 112 zcmWIYbctYKU|@t|E+EYd#N0s41jIZ*%nrmHK+FupAixU5oIniH!w1A{K+N)gF&D@D q+kgJ9dL?Fm>1QF|2Pua0%h#92F!V0{re2o!MC$J<^{emSTn7Mf;uwPf literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/packed-refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/packed-refs new file mode 100644 index 0000000000..2d08bcc8b1 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_changed_untracked_file/packed-refs @@ -0,0 +1,3 @@ +# pack-refs with: peeled fully-peeled sorted +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/FETCH_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/FETCH_HEAD new file mode 100644 index 0000000000..cf9cca57e8 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/FETCH_HEAD @@ -0,0 +1 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/HEAD new file mode 100644 index 0000000000..638398fea2 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/HEAD @@ -0,0 +1 @@ +ref: refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/ORIG_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/ORIG_HEAD new file mode 100644 index 0000000000..bab955ba6f --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/ORIG_HEAD @@ -0,0 +1 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/config b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/config new file mode 100644 index 0000000000..0128627bff --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true + worktree = ../../../sm_missing_commits +[remote "origin"] + url = ../../submodules_target + fetch = +refs/heads/*:refs/remotes/origin/* diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/description b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/description new file mode 100644 index 0000000000..893e5cad24 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/index b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/index new file mode 100644 index 0000000000000000000000000000000000000000..ae1a81398c28dc5dad6df69740ffb14a0f57de77 GIT binary patch literal 225 zcmZ?q402{*U|<5_v>W>wq?+7iU^Gw+3L2NdSU}p?=5EZd57J*k9~e}z+njZ7W_SWQ6uu$4|WE= zw9K5;_>%ni-29Zxv`UcPkRVrAASKCQq+r06VyxjdlRI^#aPCG?ukP$4lQUjBo;>3D WqDO$IibM2iq5YTOrIYK99{~VEVnHSV literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/exclude b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/exclude new file mode 100644 index 0000000000..f006809736 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/refs new file mode 100644 index 0000000000..500eca25f0 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/info/refs @@ -0,0 +1,2 @@ +8e623bcf5aeceb8af7c0f0b22b82322f6c82fd4b refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/info/commit-graph b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/info/commit-graph new file mode 100644 index 0000000000000000000000000000000000000000..e0b221014fb90d23d35c19e6604957586168d43c GIT binary patch literal 1412 zcmZ>E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HScFXm z7Ih1N#p6358(99ZmH_#{IAwJL^5cMPAkDlE7`MPY#pn$zGJAmRuAn4t607G&ZqY}m%olzRg3fFn6mqY!>9g_rq%#zN7&N< literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.pack b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.pack new file mode 100644 index 0000000000000000000000000000000000000000..a41568320e18f3ba5c362fdd85c971c9d0007d51 GIT binary patch literal 1465 zcmWG=boORoU|<4b{;7NwbLMt?^BqzUVfa4hQLFkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB7z?a?);f@Y0i}-RaT2=MRjBS-4Xl@4{r)>+rm~chquR&ufc$axm@Mn z1Mv_1Wn#xJEHMeX?crFO6bx4T5EMK%R93a z=43wZ{<^KzMfQlyBY`DOf2Zy^^Fm2S<^unD1I33aaTRmCH_lJsXJFpISiFF>Vvezi zfq}7MAV*PY$;Z;G+AB2@H|&)D{JQze^b724p>NF6=gyYAzyD4iN8r?HGbc;MPm-TM zd;X-EVJ8(1?$oYby2b0?tn%wmPn)Y|xyb!K$j7i~wtN6~a|_JuzGff0I{ALc9B!Ax z=F%p5e>KH(FwC7$Ve)#i#{v7@PvupszIA<%b7;Th7b@ zrkk2pU|Kn|#jEv!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyFW^0F$W5-fzd!QC}>;)V*zPno4YZ;K1hEFePB?$bP7zIfdR!ldkM~6=_{pG^4Gk(E?>SWQ6uu$4|WE= zw9K5;_>%ni-29Zxv`UcPkRVrAASKCQq+r06VyxjdlRI^#aPCG?ukP$4lQUjBCi6UC Vc_Zb};Jmi2M6CFR?(?H%sQ{gxL&N|8 literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/exclude b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/exclude new file mode 100644 index 0000000000..f006809736 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/refs new file mode 100644 index 0000000000..d904244d54 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/info/refs @@ -0,0 +1,2 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/info/commit-graph b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/info/commit-graph new file mode 100644 index 0000000000000000000000000000000000000000..e0b221014fb90d23d35c19e6604957586168d43c GIT binary patch literal 1412 zcmZ>E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HScFXm z7Ih1N#p6358(99ZmH_#{IAwJL^5cMPAkDlE7`MPY#pn$zGJAmRuAn4t607G&ZqY}m%olzRg3fFn6mqY!>9g_rq%#zN7&N< literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.pack b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_missing_commits_detached/objects/pack/pack-d0f76f1544d89a1d743260bac56cb63a5d2e5f89.pack new file mode 100644 index 0000000000000000000000000000000000000000..a41568320e18f3ba5c362fdd85c971c9d0007d51 GIT binary patch literal 1465 zcmWG=boORoU|<4b{;7NwbLMt?^BqzUVfa4hQLFkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB7z?a?);f@Y0i}-RaT2=MRjBS-4Xl@4{r)>+rm~chquR&ufc$axm@Mn z1Mv_1Wn#xJEHMeX?crFO6bx4T5EMK%R93a z=43wZ{<^KzMfQlyBY`DOf2Zy^^Fm2S<^unD1I33aaTRmCH_lJsXJFpISiFF>Vvezi zfq}7MAV*PY$;Z;G+AB2@H|&)D{JQze^b724p>NF6=gyYAzyD4iN8r?HGbc;MPm-TM zd;X-EVJ8(1?$oYby2b0?tn%wmPn)Y|xyb!K$j7i~wtN6~a|_JuzGff0I{ALc9B!Ax z=F%p5e>KH(FwC7$Ve)#i#{v7@PvupszIA<%b7;Th7b@ zrkk2pU|Kn|#jEv!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyFTiB&H&A58#-%^y zf*H7iTpe9}UG+*TN?>Z!uIIa}u`jVmyPj$-_FaMpCeFZsVqQw((X3A*0srilf0XFi zE8ce@$k|<=fiEpHCpEq#KR!1RE5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyF7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HSj_zd z7GrmT#p635dm*rRDh2WbfwVJ_4~$!8AkESW$y1Epz#_8;$X*Tkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB!c%# zzFZM%-SS6?b?Ku^OYZ!ca%s+$Bvn?6Xhn5n{oN7#44+;Jb8TU(n8Vv+$k$-N!(6WN z?}7LS{xY#+7nYa=-S+Uc{!pz{xv}*5>J`dPC!$y{U+6KdzrYvoKPB{Nf33ATm*t&V z3Ue|acYod1>LPnY=8?b>r@vEooOz+7BXfcOyn*7w1*{cwj7R%y5-CqV7jSk z1*VlVTfAD&*t9;nq@u9gM15;S|Mc$Z+zg%%`OKFAbzsIR*0ASe_$$T$NbxW S{;ql@W`F5tA>RinhVuY=rLE=w literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev new file mode 100644 index 0000000000000000000000000000000000000000..da062a9bef53a5041991f4b3011eb0aa9645b94d GIT binary patch literal 112 zcmWIYbctYKU|@t|E+EYd#N0s41jIZ*%nrmHK+FupAixU5oIniH!w1A{K+N)gF&D@D q+kgJ9dL?Fm>1QF|2Pua0%h#92F!V0{re2o!MC$J<^{emSTn7Mf;uwPf literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/packed-refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/packed-refs new file mode 100644 index 0000000000..2d08bcc8b1 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged/packed-refs @@ -0,0 +1,3 @@ +# pack-refs with: peeled fully-peeled sorted +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/FETCH_HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/FETCH_HEAD new file mode 100644 index 0000000000..cf9cca57e8 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/FETCH_HEAD @@ -0,0 +1 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/HEAD new file mode 100644 index 0000000000..bab955ba6f --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/HEAD @@ -0,0 +1 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/config b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/config new file mode 100644 index 0000000000..81dc858b8e --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/config @@ -0,0 +1,14 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true + worktree = ../../../sm_unchanged_detached +[remote "origin"] + url = ../../submodules_target + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "main"] + remote = origin + merge = refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/description b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/description new file mode 100644 index 0000000000..893e5cad24 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/index b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/index new file mode 100644 index 0000000000000000000000000000000000000000..01a102dbf1f291a847e8a41e80c8e3e8b136a1c8 GIT binary patch literal 225 zcmZ?q402{*U|<5_v>ThdIp-{ofYCrPC}>;)V*zOsXX8`9W?Vh_O~tuDG<>r`CT~DI$SJ8H^MRxHRPM`+YibE7|DbgsW+3 gV!xiPNYYF+`~CEGs^gmknFj`T?<#D))_%DK0B__+J^%m! literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/exclude b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/exclude new file mode 100644 index 0000000000..f006809736 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/refs new file mode 100644 index 0000000000..d904244d54 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/info/refs @@ -0,0 +1,2 @@ +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/info/commit-graph b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/info/commit-graph new file mode 100644 index 0000000000000000000000000000000000000000..e0b221014fb90d23d35c19e6604957586168d43c GIT binary patch literal 1412 zcmZ>E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyF7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HSj_zd z7GrmT#p635dm*rRDh2WbfwVJ_4~$!8AkESW$y1Epz#_8;$X*Tkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB!c%# zzFZM%-SS6?b?Ku^OYZ!ca%s+$Bvn?6Xhn5n{oN7#44+;Jb8TU(n8Vv+$k$-N!(6WN z?}7LS{xY#+7nYa=-S+Uc{!pz{xv}*5>J`dPC!$y{U+6KdzrYvoKPB{Nf33ATm*t&V z3Ue|acYod1>LPnY=8?b>r@vEooOz+7BXfcOyn*7w1*{cwj7R%y5-CqV7jSk z1*VlVTfAD&*t9;nq@u9gM15;S|Mc$Z+zg%%`OKFAbzsIR*0ASe_$$T$NbxW S{;ql@W`F5tA>RinhVuY=rLE=w literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev new file mode 100644 index 0000000000000000000000000000000000000000..da062a9bef53a5041991f4b3011eb0aa9645b94d GIT binary patch literal 112 zcmWIYbctYKU|@t|E+EYd#N0s41jIZ*%nrmHK+FupAixU5oIniH!w1A{K+N)gF&D@D q+kgJ9dL?Fm>1QF|2Pua0%h#92F!V0{re2o!MC$J<^{emSTn7Mf;uwPf literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/packed-refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/packed-refs new file mode 100644 index 0000000000..2d08bcc8b1 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/modules/sm_unchanged_detached/packed-refs @@ -0,0 +1,3 @@ +# pack-refs with: peeled fully-peeled sorted +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/info/commit-graph b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/info/commit-graph new file mode 100644 index 0000000000000000000000000000000000000000..ea7416d6195e1170a7bbcbe083cd37bcb3b8d5aa GIT binary patch literal 1292 zcmZ>E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwCLiT^x;|>^Be^M6&!qut!PDK>9k7ZAM2%c1whY& zFc7e$UCLV_npytonrV}S;4|GeeXiHFeEW~E0OgpVYIxFa>|axBvn8o&dw8JGq8qdB u?!WqP-P4uYAOoOkIMS{)1(u~ZiT literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/info/packs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/info/packs new file mode 100644 index 0000000000..5ce0b50c88 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/info/packs @@ -0,0 +1,3 @@ +P pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.pack +P pack-dc6fc56e876eba853e5d5e1cfdb2dcd012ae2cee.pack + diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.idx b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.idx new file mode 100644 index 0000000000000000000000000000000000000000..60596772466b9d22873e495f5ff8e3a18e83c3be GIT binary patch literal 1380 zcmexg;-AdGz`z8=Fu(|83ahr<7pAWrFj5`h%ZaR3RV&0DOm~K<` zsca8^w?5zJU*qVL$+CFyQ4W)kgm)8HmDxRzuzO zMayh=9f~)YQSlzXFRU_J!x{3eIFd_%ZTwmc##+jTu+%x5#yQo}Q%y E0R0WCPyhe` literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.mtimes b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.mtimes new file mode 100644 index 0000000000000000000000000000000000000000..3b335d331fe1061dc69abc0bfaba4fbf8513ba09 GIT binary patch literal 96 zcmeYb@pWZjU|MU%5{JuABN)3+pSap_Md0I?q}h5!Hn literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.pack b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.pack new file mode 100644 index 0000000000000000000000000000000000000000..e6b8ddb875d32d8172a5299f89ae518212df4e36 GIT binary patch literal 559 zcmV+~0?_?XK|@Ob00062000ZHIe46ldqyxw zq_T~bR(r3VWW2XllaH+l%n~mfDFm^->r755wG;T-c7D()X>c?Ee;i&n&ScdD_mjlt zb$m|71QKwyYhC$2e`2R(FO^jVLQGqNn{WFSQQET^$tsbWmO$^!JJu)gSUduD5J|S{ z0f0PsoSVSDjctQ6v#@?~X;N-}N@-4NaePT)QF>|#7XX4|37=_>Xc$}S!%MHRX5Jc~;!VQ3&^=FBM5VQalti5XziNulP z9Oxd`z-{Kun^r|MvQ5ziK#J(m4+9YJWhCa9*=HdUPa{ONQI)l6baC*QY+oURvtWBp zLA;D1*pVE#+=Z;@Xj7^B`K49ACfO#btgp4#eY!7ms%0;^ol{wEdO+|dpuZS>GH8tI zbeUU|fB)*iJg;xPA8{#sd}LQYSzAhHWq@{goO{j^JRukW2Lu8lXMqNIoO{l)n|Z@- xMgR?}0~Tq4KX{zm#uhZeezG#NFaQun0;-`04&~nLHsjZi^0>w7Cg2`*5t*4U`Vs&D literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.rev b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/objects/pack/pack-a1070ee5deec36e3d78ff2b8c5ea26e01e751199.rev new file mode 100644 index 0000000000000000000000000000000000000000..bce72a939e9e16c52cc4525759b1a011686f7373 GIT binary patch literal 96 zcmWIYbctYKU|@t|79hi|>r*D23*ous60rM?i&EdO-Pv`IqnnQogt*Xvro z{YO|Nf^SQy_VI09z^mgQ7_`tVW%|PDc5>zXH5xB!cH2ET7$RpPe!`2Lqhw?F;r*9B zIV&IDlNUEFd6tvEXnn2CmZYlf;ekSnZp^y7|LVVWPgiPpXlb%pSESvH@>PDK>9k7Z zAM2%cT?SUN!Mt<*<{L8T`plK>m$}~QFfHPLPkge}l8_bhscMXWZ@lDYIkCv^MZ=1c z{Z&P27mjjoah$#T!*Qh>ukUc%$ObuF`6J_Vxv2kZ;&YL;a$K%6>mNB8CHKBxarONa zhqym6`|j!1a|#~c*zNaUFsVc!?NC^UxK(@gM_*u304$@JU4g}xAuzu70*k-(Kru%k z{tx8y0BKR6+(V!^>z(|gdF^?-TJ2)vWd3ftb3tgG&O4149VJdb=LGCgXD+)jZwX7flk*;u&7H8dSXnvQGe`sx0J`{DZse4cOkQGYA|0NC_3vlG)*72?uR>ouE$XN}3_f zUz^)en1B2mT6Y9nFy0L5&x?&p}c^KxrG#DOh|r zSMt>S9&fA-?LD)it=K&CazgDPYH`@&&}S^WeszdJxN7J@bef+0F?t4cKR0VMIks$k zZxtFDRch2DcRA@B;UIU8MEm ze*pOkYIQ+=rBzm8gq<ww<#HC>oWKuzWdR%EkQ%i*DH`RAibn606Uf%W0^*B+x2#-b$u&>*-$WXeLXd{ zeMy@dWDcyV65=Rlyc*xhebv!$2q6*w{4$~pZK3ZFyvmtasUXfV11 z(SFtw4l1Q#&kUsd*iGu}QHDLPaU>-2;buA~P%g13wu1&JyO>@fAe(nRT^26H@=&Nr z7kljS+uoEbi!W>f-Hr_{3{Ejf+glqmQ3FTPFCH&r)l>?6c1B$M4cd`;;HL5>zWz~g zGUVqQ+nq$f0c+QE7NL+v!hwWf10?r1c|En*1!!lhsF15$AUl}h;JbJ_|qpIve zHhm2P)2kvQr-t{_a63ehowth~eVbbJdGgc7HLy?JTLG_db0pka3ovK zR%_%_Q}XWR)tNPoMqWWuMfLHUs_h-gO|XxF6q}KBS&Nj41{^Bu_`Z45f9FiHvd=DM ztDSE-5o2doxWvHzjTY`hv!G7l!NJLOZ3hhS4*{aqPn%}%n8IGc@W?LVpbq#yOV!3uRU*9t6glI%->CS fE(opDdADPtV7L6z0^WYlxz@K%Onuo>vBwbrG5Z!= literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/packed-refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/packed-refs new file mode 100644 index 0000000000..4db97287af --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-git/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940 refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-gitmodules b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-gitmodules new file mode 100644 index 0000000000..82237af579 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/dot-gitmodules @@ -0,0 +1,30 @@ +[submodule "sm_changed_file"] + path = sm_changed_file + url = ..\\submodules_target +[submodule "sm_missing_commits"] + path = sm_missing_commits + url = ..\\submodules_target +[submodule "sm_changed_head"] + path = sm_changed_head + url = ..\\submodules_target +[submodule "sm_changed_index"] + path = sm_changed_index + url = ..\\submodules_target +[submodule "sm_changed_untracked_file"] + path = sm_changed_untracked_file + url = ..\\submodules_target +[submodule "sm_unchanged"] + path = sm_unchanged + url = ..\\submodules_target +[submodule "sm_unchanged_detached"] + path = sm_unchanged_detached + url = ..\\submodules_target +[submodule "sm_missing_commits_detached"] + path = sm_missing_commits_detached + url = ..\\submodules_target +[submodule "sm_added_and_uncommitted"] + path = sm_added_and_uncommitted + url = ..\\submodules_target +[submodule "sm_gitmodules_only"] + path = sm_gitmodules_only + url = ..\\submodules_target diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/dot-git new file mode 100644 index 0000000000..4580fd5f88 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_added_and_uncommitted diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/file_to_modify new file mode 100644 index 0000000000..61c56af214 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_added_and_uncommitted/file_to_modify @@ -0,0 +1,3 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/dot-git new file mode 100644 index 0000000000..88871e13ac --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_changed_file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/file_to_modify new file mode 100644 index 0000000000..998c8314e3 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_file/file_to_modify @@ -0,0 +1,4 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. +In this case, the file is changed in the working directory. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/dot-git new file mode 100644 index 0000000000..d42c6077ea --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_changed_head diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/file_to_modify new file mode 100644 index 0000000000..9effc038ad --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_head/file_to_modify @@ -0,0 +1,4 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. +This one has been changed and the change has been committed to HEAD. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/dot-git new file mode 100644 index 0000000000..1bcb387276 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_changed_index diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/file_to_modify new file mode 100644 index 0000000000..5d65df9312 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_index/file_to_modify @@ -0,0 +1,4 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. +Here the file has staged changes in the submodule. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/dot-git new file mode 100644 index 0000000000..d97e616eca --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_changed_untracked_file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_is_untracked b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_is_untracked new file mode 100644 index 0000000000..07f5e9cca0 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_is_untracked @@ -0,0 +1 @@ +This file is untracked in a submodule. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_to_modify new file mode 100644 index 0000000000..61c56af214 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_changed_untracked_file/file_to_modify @@ -0,0 +1,3 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/README.txt new file mode 100644 index 0000000000..3cdd5cfaf0 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/README.txt @@ -0,0 +1 @@ +his is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/dot-git new file mode 100644 index 0000000000..9bf8d19c20 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_missing_commits diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/file_to_modify new file mode 100644 index 0000000000..1809ba67a9 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits/file_to_modify @@ -0,0 +1,2 @@ +This is a file to modify in submodules. +It has some history. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/README.txt new file mode 100644 index 0000000000..3cdd5cfaf0 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/README.txt @@ -0,0 +1 @@ +his is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/dot-git new file mode 100644 index 0000000000..00f4d68e74 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_missing_commits_detached diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/file_to_modify new file mode 100644 index 0000000000..1809ba67a9 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_missing_commits_detached/file_to_modify @@ -0,0 +1,2 @@ +This is a file to modify in submodules. +It has some history. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/dot-git new file mode 100644 index 0000000000..ea454dbc77 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_unchanged diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/file_to_modify new file mode 100644 index 0000000000..61c56af214 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged/file_to_modify @@ -0,0 +1,3 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/dot-git b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/dot-git new file mode 100644 index 0000000000..b71cae6d03 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/dot-git @@ -0,0 +1 @@ +gitdir: ../.git/modules/sm_unchanged_detached diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/file_to_modify new file mode 100644 index 0000000000..61c56af214 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules/sm_unchanged_detached/file_to_modify @@ -0,0 +1,3 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/README.txt b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/README.txt new file mode 100644 index 0000000000..4333cafa98 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/README.txt @@ -0,0 +1 @@ +This is the target for "submodules" submodule links. \ No newline at end of file diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/COMMITMESSAGE b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/COMMITMESSAGE new file mode 100644 index 0000000000..e69de29bb2 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/HEAD b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/HEAD new file mode 100644 index 0000000000..638398fea2 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/config b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/config new file mode 100644 index 0000000000..a1c2d0bb10 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/config @@ -0,0 +1,7 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/description b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/description new file mode 100644 index 0000000000..893e5cad24 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/index b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/index new file mode 100644 index 0000000000000000000000000000000000000000..ebd19dcbd93ecdc9337687f7d3818f292fbc30ca GIT binary patch literal 225 zcmZ?q402{*U|<5_wCnlq>fuotX*V|X2rc>B0~CXT#w9QokT!8PKJ{zH)sx>;oC`$5 zHyboA{V5mBz!l``=;G_DS5i>|QwuiF;_`&F>#5cfoI78@#2FY+%u7i;n)OK};Gf;{ zj}kq5#rrME5Aa}QWMT04ba7*V02d(J2f}1=advSGfwEV)yEqy_*sL)S8bq=dAlL)KVg%Yc ziib`ZFahHWhM9rvk%n1-ejW(S3bdCdSblkckd*v|p5G^#JfEmOF8N@f7SVmsX#J}_ zG5gc^uJ@mG`0+${E%iHnN!I71-n{Pme&E9cap;~}T2zSK z^6Px(m0qrx$zfHet$KZlT&A1NgXaD7zP*3*)BWK`_aFt4t{`s_2NBK%>ksY%r5$MD z!;y9=Pew!TzTc-4w~~z>PPm$uCid&uiX=@?SVPr_q}|xCB*j?6Z6O5xm%qF&wE zMyb_A+nfU4mEnqz4C@xPJUA4jI9<!-t+R(qf@%D-v>oOj0Vwl_(;!zOsJu#ef@9VyF7?ojO^&~EyUeo>9$#9r zPU6(K4l&BGT><7F2@&F+z`3pV2PcnHvQGHzU!9XoSL+-xcrxUl5 zjUG<8nwBQ^>)DDVP1BG6jnw`)GBquK_GJEnFB<26S4^|H8}sXf^q0^F2371fXPuiF z-@n}M5c6@(f#ty4^XX8`9W?Vh_O~tuDG<>r`G0!; z?po@1`jV{AN4M%68BV>$>;U6%56R&CY)SBF;b?@la_UAURm-HSj_zd z7GrmT#p635dm*rRDh2WbfwVJ_4~$!8AkESW$y1Epz#_8;$X*Tkt^6_X234P1;mc?%aYmlPG z4EOE&#$PJSt#Z#i*!9F9$Ufmrv+s+!0TRNchEE=yid>|wpJJA^M@xn8##1HR!iRG_ zk~St8C;8n_^wQu={c`id!rfnjyoU^U93ECL`@p1N zZJ(#4c!Vh?p-H9mir1EvmkM5dD`D$A*FKx4P{Oov}PA6+SNK+~!-PO7m2E zPP-yDdyVXhBL@{TyF%Q)>|7!fa9bhF+OSzSBVhAqt-9YK(tG-L9IBp_JIUX_PW!u85j6w+6u)KID{H9vXJ zYgJF3_wW+C+}CYuS8iV{YP)<}>_N9r5>9gj{3Ha=Zn(Wl>;JcB^Nd%>aHZCE{$#XE za`&3e4GKUt5u!o!hl% zB!c%# zzFZM%-SS6?b?Ku^OYZ!ca%s+$Bvn?6Xhn5n{oN7#44+;Jb8TU(n8Vv+$k$-N!(6WN z?}7LS{xY#+7nYa=-S+Uc{!pz{xv}*5>J`dPC!$y{U+6KdzrYvoKPB{Nf33ATm*t&V z3Ue|acYod1>LPnY=8?b>r@vEooOz+7BXfcOyn*7w1*{cwj7R%y5-CqV7jSk z1*VlVTfAD&*t9;nq@u9gM15;S|Mc$Z+zg%%`OKFAbzsIR*0ASe_$$T$NbxW S{;ql@W`F5tA>RinhVuY=rLE=w literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/objects/pack/pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.rev new file mode 100644 index 0000000000000000000000000000000000000000..da062a9bef53a5041991f4b3011eb0aa9645b94d GIT binary patch literal 112 zcmWIYbctYKU|@t|E+EYd#N0s41jIZ*%nrmHK+FupAixU5oIniH!w1A{K+N)gF&D@D q+kgJ9dL?Fm>1QF|2Pua0%h#92F!V0{re2o!MC$J<^{emSTn7Mf;uwPf literal 0 HcmV?d00001 diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/packed-refs b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/packed-refs new file mode 100644 index 0000000000..6fad0aa277 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/dot-git/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main diff --git a/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/file_to_modify b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/file_to_modify new file mode 100644 index 0000000000..61c56af214 --- /dev/null +++ b/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target/file_to_modify @@ -0,0 +1,3 @@ +This is a file to modify in submodules. +It has some history. +You can add more changes if needed. diff --git a/extensions/GitExtension/FileExplorerGitIntegration/Models/CommitLogCache.cs b/extensions/GitExtension/FileExplorerGitIntegration/Models/CommitLogCache.cs index 76a3e91c1d..053f018684 100644 --- a/extensions/GitExtension/FileExplorerGitIntegration/Models/CommitLogCache.cs +++ b/extensions/GitExtension/FileExplorerGitIntegration/Models/CommitLogCache.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Threading; using LibGit2Sharp; +using Serilog; namespace FileExplorerGitIntegration.Models; @@ -31,6 +32,8 @@ internal sealed class CommitLogCache private readonly LruCacheDictionary _cache = new(); + private readonly Serilog.ILogger _log = Log.ForContext("SourceContext", nameof(CommitLogCache)); + public CommitLogCache(Repository repo) { _workingDirectory = repo.Info.WorkingDirectory; @@ -94,7 +97,21 @@ public CommitLogCache(Repository repo) private CommitWrapper? FindLastCommitUsingCommandLine(string relativePath) { - var result = GitExecute.ExecuteGitCommand(_gitDetect.GitConfiguration.ReadInstallPath(), _workingDirectory, $"log -n 1 --pretty=format:%s%n%an%n%ae%n%aI%n%H -- {relativePath}"); + if (string.IsNullOrEmpty(relativePath)) + { + relativePath = "."; + } + + var fullPath = Path.Combine(_workingDirectory, relativePath); + var directory = Path.GetDirectoryName(fullPath); + var filename = Path.GetFileName(fullPath); + if (string.IsNullOrEmpty(directory) || string.IsNullOrEmpty(filename)) + { + _log.Warning($"FindLastCommitUsingCommandLine failed to parse relativePath {relativePath}"); + return null; + } + + var result = GitExecute.ExecuteGitCommand(_gitDetect.GitConfiguration.ReadInstallPath(), directory, $"log -n 1 --pretty=format:%s%n%an%n%ae%n%aI%n%H -- {filename}"); if ((result.Status != Microsoft.Windows.DevHome.SDK.ProviderOperationStatus.Success) || (result.Output is null)) { return null; diff --git a/extensions/GitExtension/FileExplorerGitIntegration/Models/GitLocalRepository.cs b/extensions/GitExtension/FileExplorerGitIntegration/Models/GitLocalRepository.cs index eb23a4e414..40b8a32689 100644 --- a/extensions/GitExtension/FileExplorerGitIntegration/Models/GitLocalRepository.cs +++ b/extensions/GitExtension/FileExplorerGitIntegration/Models/GitLocalRepository.cs @@ -140,7 +140,7 @@ public IPropertySet GetProperties(string[] properties, string relativePath) { try { - return repository.GetRepoStatus(); + return repository.GetRepoStatus(relativePath); } catch { diff --git a/extensions/GitExtension/FileExplorerGitIntegration/Models/GitRepositoryStatus.cs b/extensions/GitExtension/FileExplorerGitIntegration/Models/GitRepositoryStatus.cs index 890f72ca2b..8f898bf2df 100644 --- a/extensions/GitExtension/FileExplorerGitIntegration/Models/GitRepositoryStatus.cs +++ b/extensions/GitExtension/FileExplorerGitIntegration/Models/GitRepositoryStatus.cs @@ -8,16 +8,7 @@ namespace FileExplorerGitIntegration.Models; internal sealed class GitRepositoryStatus { private readonly Dictionary _fileEntries = new(); - private readonly List _added = new(); - private readonly List _staged = new(); - private readonly List _removed = new(); - private readonly List _untracked = new(); - private readonly List _modified = new(); - private readonly List _missing = new(); - private readonly List _ignored = new(); - private readonly List _renamedInIndex = new(); - private readonly List _renamedInWorkDir = new(); - private readonly List _conflicted = new(); + private readonly Dictionary _submoduleEntries = new(); private readonly Dictionary> _statusEntries = new(); public GitRepositoryStatus() @@ -45,6 +36,11 @@ public void Add(string path, GitStatusEntry status) } } + public bool TryAdd(string path, SubmoduleStatus status) + { + return _submoduleEntries.TryAdd(path, status); + } + public Dictionary FileEntries => _fileEntries; public List Added => _statusEntries[FileStatus.NewInIndex]; @@ -64,4 +60,6 @@ public void Add(string path, GitStatusEntry status) public List RenamedInWorkDir => _statusEntries[FileStatus.RenamedInWorkdir]; public List Conflicted => _statusEntries[FileStatus.Conflicted]; + + public Dictionary SubmoduleEntries => _submoduleEntries; } diff --git a/extensions/GitExtension/FileExplorerGitIntegration/Models/RepositoryWrapper.cs b/extensions/GitExtension/FileExplorerGitIntegration/Models/RepositoryWrapper.cs index f7a92b4825..7d5ddd4167 100644 --- a/extensions/GitExtension/FileExplorerGitIntegration/Models/RepositoryWrapper.cs +++ b/extensions/GitExtension/FileExplorerGitIntegration/Models/RepositoryWrapper.cs @@ -26,12 +26,19 @@ internal sealed class RepositoryWrapper : IDisposable private readonly string _folderStatusDetached; private readonly string _fileStatusMergeConflict; private readonly string _fileStatusUntracked; + private readonly string _fileStatusAdded; + private readonly string _fileStatusAddedModified; private readonly string _fileStatusStaged; private readonly string _fileStatusStagedRenamed; private readonly string _fileStatusStagedModified; private readonly string _fileStatusStagedRenamedModified; private readonly string _fileStatusModified; private readonly string _fileStatusRenamedModified; + private readonly string _submoduleStatusAdded; + private readonly string _submoduleStatusChanged; + private readonly string _submoduleStatusDirty; + private readonly string _submoduleStatusStaged; + private readonly string _submoduleStatusUntracked; private Commit? _head; private CommitLogCache? _commits; @@ -48,12 +55,19 @@ public RepositoryWrapper(string rootFolder) _folderStatusDetached = _stringResource.GetLocalized("FolderStatusDetached"); _fileStatusMergeConflict = _stringResource.GetLocalized("FileStatusMergeConflict"); _fileStatusUntracked = _stringResource.GetLocalized("FileStatusUntracked"); + _fileStatusAdded = _stringResource.GetLocalized("FileStatusAdded"); + _fileStatusAddedModified = _stringResource.GetLocalized("FileStatusAddedModified"); _fileStatusStaged = _stringResource.GetLocalized("FileStatusStaged"); _fileStatusStagedRenamed = _stringResource.GetLocalized("FileStatusStagedRenamed"); _fileStatusStagedModified = _stringResource.GetLocalized("FileStatusStagedModified"); _fileStatusStagedRenamedModified = _stringResource.GetLocalized("FileStatusStagedRenamedModified"); _fileStatusModified = _stringResource.GetLocalized("FileStatusModified"); _fileStatusRenamedModified = _stringResource.GetLocalized("FileStatusRenamedModified"); + _submoduleStatusAdded = _stringResource.GetLocalized("SubmoduleStatusAdded"); + _submoduleStatusChanged = _stringResource.GetLocalized("SubmoduleStatusChanged"); + _submoduleStatusDirty = _stringResource.GetLocalized("SubmoduleStatusDirty"); + _submoduleStatusStaged = _stringResource.GetLocalized("SubmoduleStatusStaged"); + _submoduleStatusUntracked = _stringResource.GetLocalized("SubmoduleStatusUntracked"); } public CommitWrapper? FindLastCommit(string relativePath) @@ -102,7 +116,7 @@ private CommitLogCache GetCommitLogCache() return _commits; } - public string GetRepoStatus() + public string GetRepoStatus(string relativePath) { var repoStatus = _statusCache.Status; @@ -154,12 +168,20 @@ public string GetRepoStatus() public string GetFileStatus(string relativePath) { - GitStatusEntry? status; - if (!_statusCache.Status.FileEntries.TryGetValue(relativePath, out status)) + if (_statusCache.Status.SubmoduleEntries.TryGetValue(relativePath, out var subStatus)) { - return string.Empty; + return ToString(subStatus); + } + else if (_statusCache.Status.FileEntries.TryGetValue(relativePath, out var status)) + { + return ToString(status); } + return string.Empty; + } + + private string ToString(GitStatusEntry status) + { if (status.Status == FileStatus.Unaltered || status.Status.HasFlag(FileStatus.Nonexistent | FileStatus.Ignored)) { return string.Empty; @@ -174,7 +196,8 @@ public string GetFileStatus(string relativePath) } var statusString = string.Empty; - var staged = status.Status.HasFlag(FileStatus.NewInIndex) || status.Status.HasFlag(FileStatus.ModifiedInIndex) || status.Status.HasFlag(FileStatus.RenamedInIndex) || status.Status.HasFlag(FileStatus.TypeChangeInIndex); + var added = status.Status.HasFlag(FileStatus.NewInIndex); + var staged = status.Status.HasFlag(FileStatus.ModifiedInIndex) || status.Status.HasFlag(FileStatus.RenamedInIndex) || status.Status.HasFlag(FileStatus.TypeChangeInIndex); var modified = status.Status.HasFlag(FileStatus.ModifiedInWorkdir) || status.Status.HasFlag(FileStatus.TypeChangeInWorkdir); var renamed = status.Status.HasFlag(FileStatus.RenamedInIndex) || status.Status.HasFlag(FileStatus.RenamedInWorkdir); @@ -197,6 +220,17 @@ public string GetFileStatus(string relativePath) statusString = _fileStatusStaged; } } + else if (added) + { + if (modified) + { + statusString = _fileStatusAddedModified; + } + else + { + statusString = _fileStatusAdded; + } + } else if (modified) { if (renamed) @@ -212,6 +246,32 @@ public string GetFileStatus(string relativePath) return statusString; } + private string ToString(SubmoduleStatus status) + { + if (status.HasFlag(SubmoduleStatus.WorkDirFilesModified) || status.HasFlag(SubmoduleStatus.WorkDirFilesUntracked) || status.HasFlag(SubmoduleStatus.WorkDirFilesIndexDirty)) + { + return _submoduleStatusDirty; + } + else if (status.HasFlag(SubmoduleStatus.WorkDirModified)) + { + return _submoduleStatusChanged; + } + else if (status.HasFlag(SubmoduleStatus.WorkDirAdded)) + { + return _submoduleStatusUntracked; + } + else if (status.HasFlag(SubmoduleStatus.IndexAdded)) + { + return _submoduleStatusAdded; + } + else if (status.HasFlag(SubmoduleStatus.IndexModified)) + { + return _submoduleStatusStaged; + } + + return string.Empty; + } + // Detect uncommitted renames and return the original path. // This allows us to get the commit history, because the new path doesn't exist yet. private string GetOriginalPath(string relativePath) diff --git a/extensions/GitExtension/FileExplorerGitIntegration/Models/StatusCache.cs b/extensions/GitExtension/FileExplorerGitIntegration/Models/StatusCache.cs index cc221afad8..6019829cf7 100644 --- a/extensions/GitExtension/FileExplorerGitIntegration/Models/StatusCache.cs +++ b/extensions/GitExtension/FileExplorerGitIntegration/Models/StatusCache.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace FileExplorerGitIntegration.Models; - using System.Data; using System.Diagnostics; using System.Runtime.InteropServices; @@ -10,8 +8,11 @@ namespace FileExplorerGitIntegration.Models; using LibGit2Sharp; using Microsoft.Extensions.FileSystemGlobbing; using Microsoft.Windows.DevHome.SDK; +using Serilog; using Windows.Win32; +namespace FileExplorerGitIntegration.Models; + // Caches the most recently obtained repo status. // Use FileSystemWatcher to invalidate the cache. // File-based invalidation can come in swarms. For example, building a project, changing/pulling branches. @@ -24,6 +25,7 @@ internal sealed class StatusCache : IDisposable private readonly ReaderWriterLockSlim _statusLock = new(); private readonly GitDetect _gitDetect = new(); private readonly bool _gitInstalled; + private readonly Serilog.ILogger _log = Log.ForContext("SourceContext", nameof(StatusCache)); private GitRepositoryStatus? _status; private bool _disposedValue; @@ -182,12 +184,11 @@ private void UpdateStatus(GitRepositoryStatus newStatus) } } - private GitRepositoryStatus RetrieveStatus() + private string? RetrieveStatusFromDirectory(string workingDirectory) { - var repoStatus = new GitRepositoryStatus(); if (!_gitInstalled) { - return repoStatus; + return null; } // Options fully explained at https://git-scm.com/docs/git-status @@ -198,86 +199,81 @@ private GitRepositoryStatus RetrieveStatus() // Disclaimer: I'm not sure how far back porcelain=v2 is supported, but I'm pretty sure it's at least 3-4 years. // There could be old Git installations that predate it. // -z : Terminate filenames and entries with NUL instead of space/LF. This helps us deal with filenames containing spaces. - var result = GitExecute.ExecuteGitCommand(_gitDetect.GitConfiguration.ReadInstallPath(), _workingDirectory, "--no-optional-locks status --porcelain=v2 -z"); - if (result.Status != ProviderOperationStatus.Success || result.Output == null) + var result = GitExecute.ExecuteGitCommand(_gitDetect.GitConfiguration.ReadInstallPath(), workingDirectory, "--no-optional-locks status --porcelain=v2 -z"); + if (result.Status != ProviderOperationStatus.Success) + { + return null; + } + + return result.Output; + } + + private void EnsureSubmodules(GitRepositoryStatus repoStatus) + { + var result = GitExecute.ExecuteGitCommand(_gitDetect.GitConfiguration.ReadInstallPath(), _workingDirectory, "--no-optional-locks submodule status --recursive"); + if (result.Status != ProviderOperationStatus.Success || result.Output is null) + { + return; + } + + var parts = result.Output.Split('\n', StringSplitOptions.RemoveEmptyEntries); + foreach (var line in parts) { - return repoStatus; + var pieces = line.Split(' ', 2); + if (pieces.Length != 2) + { + continue; + } + + var path = pieces[1]; + repoStatus.TryAdd(path, SubmoduleStatus.Unmodified); } + } - var parts = result.Output.Split('\0', StringSplitOptions.RemoveEmptyEntries); + private GitRepositoryStatus RetrieveStatus() + { + var repoStatus = new GitRepositoryStatus(); + ParseStatus(RetrieveStatusFromDirectory(_workingDirectory), repoStatus); + return repoStatus; + } + + private void ParseStatus(string? statusString, GitRepositoryStatus repoStatus, string relativeDir = "") + { + if (string.IsNullOrEmpty(statusString)) + { + return; + } + + var parts = statusString.Split('\0', StringSplitOptions.RemoveEmptyEntries); for (var i = 0; i < parts.Length; ++i) { var line = parts[i]; + if (line.Length < 2) + { + continue; + } + if (line.StartsWith("1 ", StringComparison.Ordinal)) { // For porcelain=v2, "ordinary" entries have the following format: // 1 - // For now, we only care about the and fields. var pieces = line.Split(' ', 9); var fileStatusString = pieces[1]; - var filePath = pieces[8]; - FileStatus statusEntry = FileStatus.Unaltered; - switch (fileStatusString[0]) - { - case 'M': - statusEntry |= FileStatus.ModifiedInIndex; - break; - - case 'T': - statusEntry |= FileStatus.TypeChangeInIndex; - break; - - case 'A': - statusEntry |= FileStatus.NewInIndex; - break; - - case 'D': - statusEntry |= FileStatus.DeletedFromIndex; - break; - } - - switch (fileStatusString[1]) - { - case 'M': - statusEntry |= FileStatus.ModifiedInWorkdir; - break; - - case 'T': - statusEntry |= FileStatus.TypeChangeInWorkdir; - break; - - case 'A': - statusEntry |= FileStatus.NewInWorkdir; - break; - - case 'D': - statusEntry |= FileStatus.DeletedFromWorkdir; - break; - } - - repoStatus.Add(filePath, new GitStatusEntry(filePath, statusEntry)); + var submoduleStatusString = pieces[2]; + var filePath = Path.Combine(relativeDir, pieces[8]).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); + var headSha = pieces[6]; + var indexSha = pieces[7]; + ParseOrdinaryStatusEntry(repoStatus, fileStatusString, submoduleStatusString, filePath, headSha, indexSha); } else if (line.StartsWith("2 ", StringComparison.Ordinal)) { // For porcelain=v2, "rename" entries have the following format: // 2 - // For now, we only care about the , , and fields. var pieces = line.Split(' ', 10); var fileStatusString = pieces[1]; - var newPath = pieces[9]; - var oldPath = parts[++i]; - FileStatus statusEntry = FileStatus.Unaltered; - if (fileStatusString[0] == 'R') - { - statusEntry |= FileStatus.RenamedInIndex; - } - - if (fileStatusString[1] == 'R') - { - statusEntry |= FileStatus.RenamedInWorkdir; - } - - repoStatus.Add(newPath, new GitStatusEntry(newPath, statusEntry, oldPath)); + var newPath = Path.Combine(relativeDir, pieces[9]).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); + var oldPath = Path.Combine(relativeDir, parts[++i]).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); + ParseRenameStatusEntry(repoStatus, fileStatusString, newPath, oldPath); } else if (line.StartsWith("u ", StringComparison.Ordinal)) { @@ -285,7 +281,7 @@ private GitRepositoryStatus RetrieveStatus() // u

// For now, we only care about the . (We only say that the file has a conflict, not the details) var pieces = line.Split(' ', 11); - var filePath = pieces[10]; + var filePath = Path.Combine(relativeDir, pieces[10]).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); repoStatus.Add(filePath, new GitStatusEntry(filePath, FileStatus.Conflicted)); } else if (line.StartsWith("? ", StringComparison.Ordinal)) @@ -293,12 +289,162 @@ private GitRepositoryStatus RetrieveStatus() // For porcelain=v2, "untracked" entries have the following format: // ? // For now, we only care about the . - var filePath = line.Substring(2); + var filePath = Path.Combine(relativeDir, line.Substring(2)).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); repoStatus.Add(filePath, new GitStatusEntry(filePath, FileStatus.NewInWorkdir)); } + else + { + _log.Warning($"Encountered unexpected line in ParseStatus: {line}"); + } } + } - return repoStatus; + private void ParseOrdinaryStatusEntry( + GitRepositoryStatus repoStatus, + string fileStatusString, + string submoduleStatusString, + string filePath, + string headSha, + string indexSha) + { + Debug.Assert(fileStatusString.Length == 2, "File status string must be 2 characters long"); + Debug.Assert(submoduleStatusString.Length == 4, "Submodule status string must be 4 characters long"); + + FileStatus statusEntry = FileStatus.Unaltered; + switch (fileStatusString[0]) + { + case 'M': + statusEntry |= FileStatus.ModifiedInIndex; + break; + + case 'T': + statusEntry |= FileStatus.TypeChangeInIndex; + break; + + case 'A': + statusEntry |= FileStatus.NewInIndex; + break; + + case 'D': + statusEntry |= FileStatus.DeletedFromIndex; + break; + } + + switch (fileStatusString[1]) + { + case 'M': + statusEntry |= FileStatus.ModifiedInWorkdir; + break; + + case 'T': + statusEntry |= FileStatus.TypeChangeInWorkdir; + break; + + case 'A': + statusEntry |= FileStatus.NewInWorkdir; + break; + + case 'D': + statusEntry |= FileStatus.DeletedFromWorkdir; + break; + } + + repoStatus.Add(filePath, new GitStatusEntry(filePath, statusEntry)); + + // "N..." when the entry is not a submodule. + // "S" when the entry is a submodule. + if (submoduleStatusString[0] == 'S') + { + ParseSubmoduleStatusEntry(repoStatus, statusEntry, fileStatusString, submoduleStatusString, filePath, headSha, indexSha); + } + } + + private void ParseSubmoduleStatusEntry( + GitRepositoryStatus repoStatus, + FileStatus statusEntry, + string fileStatusString, + string submoduleStatusString, + string filePath, + string headSha, + string indexSha) + { + // "S" when the entry is a submodule. + // is "C" if the commit changed; otherwise ".". + // is "M" if it has tracked changes; otherwise ".". + // is "U" if there are untracked changes; otherwise ".". + if (submoduleStatusString[0] == 'S') + { + SubmoduleStatus submoduleStatus = SubmoduleStatus.Unmodified; + if (statusEntry.HasFlag(FileStatus.NewInIndex)) + { + submoduleStatus |= SubmoduleStatus.IndexAdded; + } + + if (statusEntry.HasFlag(FileStatus.NewInWorkdir)) + { + submoduleStatus |= SubmoduleStatus.WorkDirAdded; + } + + if (submoduleStatusString[1] != '.' || headSha.Equals(indexSha, StringComparison.Ordinal)) + { + // The commit changed in the submodule. + if (statusEntry.HasFlag(FileStatus.ModifiedInIndex)) + { + submoduleStatus |= SubmoduleStatus.IndexModified; + } + + if (statusEntry.HasFlag(FileStatus.ModifiedInWorkdir)) + { + submoduleStatus |= SubmoduleStatus.WorkDirModified; + } + } + + if (submoduleStatusString[2] != '.') + { + // The submodule has modified files + if (statusEntry.HasFlag(FileStatus.ModifiedInIndex)) + { + submoduleStatus |= SubmoduleStatus.WorkDirFilesIndexDirty; + } + + if (statusEntry.HasFlag(FileStatus.ModifiedInWorkdir)) + { + submoduleStatus |= SubmoduleStatus.WorkDirFilesModified; + } + } + + if (submoduleStatusString[3] != '.') + { + // The submodule has untracked files + if (statusEntry.HasFlag(FileStatus.ModifiedInIndex)) + { + submoduleStatus |= SubmoduleStatus.WorkDirFilesIndexDirty; + } + + if (statusEntry.HasFlag(FileStatus.ModifiedInWorkdir)) + { + submoduleStatus |= SubmoduleStatus.WorkDirFilesUntracked; + } + } + + repoStatus.TryAdd(filePath, submoduleStatus); + } + } + + private void ParseRenameStatusEntry(GitRepositoryStatus repoStatus, string fileStatusString, string newPath, string oldPath) + { + FileStatus statusEntry = FileStatus.Unaltered; + if (fileStatusString[0] == 'R') + { + statusEntry |= FileStatus.RenamedInIndex; + } + + if (fileStatusString[1] == 'R') + { + statusEntry |= FileStatus.RenamedInWorkdir; + } + + repoStatus.Add(newPath, new GitStatusEntry(newPath, statusEntry, oldPath)); } private void Invalidate() diff --git a/extensions/GitExtension/FileExplorerGitIntegration/Strings/en-us/Resources.resw b/extensions/GitExtension/FileExplorerGitIntegration/Strings/en-us/Resources.resw index 031107f9b6..8391eb7cbc 100644 --- a/extensions/GitExtension/FileExplorerGitIntegration/Strings/en-us/Resources.resw +++ b/extensions/GitExtension/FileExplorerGitIntegration/Strings/en-us/Resources.resw @@ -161,6 +161,34 @@ Renamed, Modified File status to display when its Git status is renamed with unstaged changes + + Submodule Staged + Submodule status to display when the Git submodule refers to a different commit, and is staged + + + Submodule Dirty + Submodule status to display when the Git submodule has local modifications + + + Submodule Changed + Submodule status to display when the Git submodule refers to a different commit + + + Added + File status to display when its Git status is newly added to the index + + + Added, Modified + File status to display when its Git status is newly added to the index and modified in the working directory + + + Submodule Untracked + Submodule status to display when a submodule is added but not staged + + + Submodule Added + Submodule status to display when a submodule is added and staged + Please choose a path to the working directory. For example, the path with the .git subfolder. Display message when the repository path is invalid