Skip to content

Commit

Permalink
Don't ignore unstaged files in local flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Jun 20, 2022
1 parent 7e301fd commit 0943f30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libfetchers/git.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,12 @@ std::pair<StorePath, Input> fetchFromWorkdir(ref<Store> store, Input & input, co
if (fetchSettings.warnDirty)
warn("Git tree '%s' is dirty", workdir);

auto gitOpts = Strings({ "-C", workdir, "--git-dir", gitDir, "ls-files", "-z" });
auto gitOpts = Strings({ "-C", workdir, "--git-dir", gitDir, "ls-files", "--cached", "-z" });
if (submodules)
gitOpts.emplace_back("--recurse-submodules");
else
gitOpts.emplace_back("--others");
gitOpts.emplace_back("--exclude-standard");

auto files = tokenizeString<std::set<std::string>>(
runProgram("git", true, gitOpts), "\0"s);
Expand Down

0 comments on commit 0943f30

Please sign in to comment.