aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Stecklina <julian.stecklina@cyberus-technology.de>2020-03-02 15:50:39 +0100
committerJulian Stecklina <js@alien8.de>2020-03-29 22:29:58 +0200
commit6c00a9545f2162496032c490aadbadd85856662c (patch)
tree00a6f3eb5fabff4b1db05647a6a65a4f2d9717cb
parent435366ed3c292756bb74fd12f47ff96e93cd48ac (diff)
Fix typo in submodule test
-rw-r--r--tests/fetchGitSubmodules.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/fetchGitSubmodules.sh b/tests/fetchGitSubmodules.sh
index 6e4ef270b..9a21421cc 100644
--- a/tests/fetchGitSubmodules.sh
+++ b/tests/fetchGitSubmodules.sh
@@ -56,7 +56,8 @@ pathWithSubmodulesAgain=$(nix eval --raw "(builtins.fetchGit { url = file://$roo
test "$(find "$pathWithSubmodules" -name .git)" = ""
# Git repos without submodules can be fetched with submodules = true.
-noSubmoduleRepoBaseline=$(nix eval --raw "(builtins.fetchGit { url = file://$subRepo; rev = \"$rev\"; }).outPath")
-noSubmoduleRepo=$(nix eval --raw "(builtins.fetchGit { url = file://$subRepo; rev = \"$rev\"; submodules = true; }).outPath")
+subRev=$(git -C $subRepo rev-parse HEAD)
+noSubmoduleRepoBaseline=$(nix eval --raw "(builtins.fetchGit { url = file://$subRepo; rev = \"$subRev\"; }).outPath")
+noSubmoduleRepo=$(nix eval --raw "(builtins.fetchGit { url = file://$subRepo; rev = \"$subRev\"; submodules = true; }).outPath")
[[ $noSubmoduleRepoBaseline == $noSubmoduleRepo ]]