Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
We were simply passing in the wrong path. This went uncaught because the
TODO about deduplication hasn't happened yet.
  • Loading branch information
Ericson2314 committed Jan 22, 2025
1 parent 64a3899 commit 7f7ca38
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstore/unix/build/local-derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
case FileIngestionMethod::Git: {
return git::dumpHash(
outputHash.hashAlgo,
{getFSSourceAccessor(), CanonPath(tmpDir + "/tmp")}).hash;
{getFSSourceAccessor(), CanonPath(actualPath)}).hash;
}
}
assert(false);
Expand Down
3 changes: 3 additions & 0 deletions tests/functional/fixed.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ rec {

# Can use "nar" instead of "recursive" now.
nar-not-recursive = f2 "foo" ./fixed.builder2.sh "nar" "md5" "3670af73070fa14077ad74e0f5ea4e42";

# Experimental feature
git = f2 "foo" ./fixed.builder2.sh "git" "sha1" "cd44baf36915d5dec8374232ea7e2057f3b4494e";
}
6 changes: 6 additions & 0 deletions tests/functional/git-hashing/fixed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source common.sh

# Store layer needs bugfix
requireDaemonNewerThan "2.27pre20250122"

nix-build ../fixed.nix -A git --no-out-link
1 change: 1 addition & 0 deletions tests/functional/git-hashing/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ suites += {
'deps': [],
'tests': [
'simple.sh',
'fixed.sh',
],
'workdir': meson.current_source_dir(),
}

0 comments on commit 7f7ca38

Please sign in to comment.