mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
Automatically do git/hg add on flake.lock
This commit is contained in:
parent
f83acbbfe3
commit
d5334c466b
5 changed files with 47 additions and 23 deletions
|
|
@ -165,6 +165,18 @@ struct GitInput : Input
|
|||
return {};
|
||||
}
|
||||
|
||||
void markChangedFile(std::string_view file) const override
|
||||
{
|
||||
auto sourcePath = getSourcePath();
|
||||
assert(sourcePath);
|
||||
runProgram("git", true,
|
||||
{ "-C", *sourcePath, "add",
|
||||
"--force",
|
||||
"--intent-to-add",
|
||||
std::string(file)
|
||||
});
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> getActualUrl() const
|
||||
{
|
||||
// Don't clone file:// URIs (but otherwise treat them the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue