Skip to content

Commit

Permalink
PR feedback, update submodules test repos
Browse files Browse the repository at this point in the history
  • Loading branch information
DefaultRyan committed Sep 4, 2024
1 parent daec1bb commit 38ac731
Show file tree
Hide file tree
Showing 374 changed files with 437 additions and 323 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public class GitSubmoduleUnitTests
public static void ClassInitialize(TestContext testContext)
{
_sandbox = new();
var repopath = _sandbox.CreateSandbox("submodules");
var repoPath = _sandbox.CreateSandbox("submodules");
_sandbox.CreateSandbox("submodules_target");
_repo = new GitLocalRepository(repopath);
_repo = new GitLocalRepository(repoPath);
}

[ClassCleanup]
Expand All @@ -40,13 +40,13 @@ public static void ClassCleanup()
[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, "Staged")]
[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_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)
Expand All @@ -58,19 +58,18 @@ public void RootFolderStatus(string path, string property, string value)
}

[TestMethod]

[DataRow("", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("", ShaProp, "8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940")]
[DataRow(".gitmodules", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("README.txt", ShaProp, "74b157c3bfd2f24323c3bc6e5e96639a424f157f")]
[DataRow("sm_added_and_uncommitted", ShaProp, "")]
[DataRow("sm_changed_file", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("sm_changed_head", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("sm_changed_index", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("sm_changed_untracked_file", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("sm_missing_commits", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("sm_missing_commits_detached", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("sm_unchanged", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[DataRow("sm_unchanged_detached", ShaProp, "d8ebdc0b3c1d5240d4fc1c4cd3728ff561e714ad")]
[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);
Expand All @@ -89,7 +88,7 @@ public void RootFolderCommit(string path, string property, string value)
[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, "1973c02c4ac6e5743199e14fa4311746f9b39fbe")]
[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")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* binary
.gitattributes diff
.gitignore diff
config diff
resources_readme.txt diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
COMMIT_EDITMSG
exclude
logs/
description
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ref: refs/heads/main
ref: refs/heads/main
Original file line number Diff line number Diff line change
@@ -1 +1 @@
74b157c3bfd2f24323c3bc6e5e96639a424f157f
3e1e770f7c28e87cbb3ee0c1541e3417c84a0708
Original file line number Diff line number Diff line change
@@ -1,34 +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:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target
[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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Unnamed repository; edit this file 'description' to name the repository.
Unnamed repository; edit this file 'description' to name the repository.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +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]
# *~
# 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]
# *~
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8a303a1d530d9d4e9f31002d4c9d1d8f1cd78940 refs/heads/main
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ignorecase = true
worktree = ../../../sm_added_and_uncommitted
[remote "origin"]
url = E:/Repos/GitHub/devhome/extensions/GitExtension/FileExplorerGitIntegration.UnitTest/resources/submodules_target
url = E:/temp/resources/submodules_target
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/HEAD
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
P pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack
P pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# pack-refs with: peeled fully-peeled sorted
e9a899083a7e2b25d7a41e69463ce083bf9ef6ef refs/remotes/origin/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ref: refs/heads/main
ref: refs/heads/main
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
worktree = ../../../sm_changed_file
[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/*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Unnamed repository; edit this file 'description' to name the repository.
Unnamed repository; edit this file 'description' to name the repository.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +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]
# *~
# 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]
# *~
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
P pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack
P pack-ffa30a089fdbfcfdaaea163fd2f9710ef01a00cf.pack

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# pack-refs with: peeled fully-peeled sorted
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Committing a change to submodule
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4bb90658751b1d839ee1277368998be69deacca5
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
worktree = ../../../sm_changed_head
[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/*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Unnamed repository; edit this file 'description' to name the repository.
Unnamed repository; edit this file 'description' to name the repository.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +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]
# *~
# 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]
# *~
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2ab664114c928551863c33d694965c79b6b75144 refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
P pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack
P pack-9201333783142a88b5199747b1d4aa993fd8df68.pack

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# pack-refs with: peeled fully-peeled sorted
2ab664114c928551863c33d694965c79b6b75144 refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ref: refs/heads/main
ref: refs/heads/main
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
worktree = ../../../sm_changed_index
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
worktree = ../../../sm_changed_index
[remote "origin"]
url = ../../submodules_target
fetch = +refs/heads/*:refs/remotes/origin/*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Unnamed repository; edit this file 'description' to name the repository.
Unnamed repository; edit this file 'description' to name the repository.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +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]
# *~
# 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]
# *~
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
P pack-d3b1b7cf66ad317ab08fb781dba8d8ae68e1b200.pack
P pack-2077343301131983b67a949d28b0995936863afe.pack

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# pack-refs with: peeled fully-peeled sorted
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/heads/main
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc refs/remotes/origin/main
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bc132afeabc5cbf67bdaf4f92c3e391472a27dc not-for-merge branch 'main' of ../../submodules_target
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ref: refs/heads/main
ref: refs/heads/main
Loading

0 comments on commit 38ac731

Please sign in to comment.