-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Issue description
Currently, using gitTracked ./. in a local project fails when that project is fetched with e.g. fetchGit, since there's no .git directory in that case.
Steps to reproduce
$ nix-instantiate https://github.com/infinisil/gitTracked-example/tarball/master --eval -A outPath
error: lib.fileset.gitTracked: Expected the argument (/nix/store/sdhphiawzjiw9yxr50iqf729sd14wmy1-source) to point to a local working tree of a Git repository, but it's not.
Proposed solution
Detect whether the passed path is already in the Nix store, in which case just return the set of all its files. Only fail if that's not the case.
A bit icky but might be fine? Needs a bit more thought.
This issue is sponsored by Antithesis ✨
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels