Skip to content

Commit

Permalink
Merge pull request #6582 from NixOS/debug-fetchgit-sigsev
Browse files Browse the repository at this point in the history
Fix a segfault in the git fetcher
  • Loading branch information
edolstra authored May 31, 2022
2 parents 04a699b + 027fd45 commit 078c80f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libfetchers/git.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,10 @@ struct GitInputScheme : InputScheme
}
}

const Attrs unlockedAttrs({
Attrs unlockedAttrs({
{"type", cacheType},
{"name", name},
{"url", actualUrl},
{"ref", *input.getRef()},
});

Path repoDir;
Expand All @@ -466,6 +465,7 @@ struct GitInputScheme : InputScheme
head = "master";
}
input.attrs.insert_or_assign("ref", *head);
unlockedAttrs.insert_or_assign("ref", *head);
}

if (!input.getRev())
Expand All @@ -482,6 +482,7 @@ struct GitInputScheme : InputScheme
head = "master";
}
input.attrs.insert_or_assign("ref", *head);
unlockedAttrs.insert_or_assign("ref", *head);
}

if (auto res = getCache()->lookup(store, unlockedAttrs)) {
Expand Down

0 comments on commit 078c80f

Please sign in to comment.