mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
updateLockFile: Do "git add" in a slightly nicer way
"--intent-to-add" ensures the change shows up in "git diff".
This commit is contained in:
parent
b9c016abc1
commit
9d07c3717b
1 changed files with 1 additions and 1 deletions
|
@ -417,7 +417,7 @@ void updateLockFile(EvalState & state, const FlakeUri & flakeUri)
|
|||
// Hack: Make sure that flake.lock is visible to Git. Otherwise,
|
||||
// exportGit will fail to copy it to the Nix store.
|
||||
runProgram("git", true,
|
||||
{ "-C", refData->path, "add",
|
||||
{ "-C", refData->path, "add", "--intent-to-add",
|
||||
(flakeRef.subdir == "" ? "" : flakeRef.subdir + "/") + "flake.lock" });
|
||||
} else
|
||||
throw Error("flakeUri %s can't be updated because it is not a path", flakeUri);
|
||||
|
|
Loading…
Reference in a new issue