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
|
@ -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