forked from lix-project/lix
nix flake init: Use git add --force
This commit is contained in:
parent
334e26bfc2
commit
09fc06daab
|
@ -589,7 +589,7 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand
|
||||||
copyDir(templateDir, flakeDir);
|
copyDir(templateDir, flakeDir);
|
||||||
|
|
||||||
if (pathExists(flakeDir + "/.git")) {
|
if (pathExists(flakeDir + "/.git")) {
|
||||||
Strings args = { "-C", flakeDir, "add", "--intent-to-add", "--" };
|
Strings args = { "-C", flakeDir, "add", "--intent-to-add", "--force", "--" };
|
||||||
for (auto & s : files) args.push_back(s);
|
for (auto & s : files) args.push_back(s);
|
||||||
runProgram("git", true, args);
|
runProgram("git", true, args);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue