mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
Add option --commit-lock-file
This commit is contained in:
parent
e2213d77a2
commit
9d7fb62db6
7 changed files with 42 additions and 27 deletions
|
|
@ -169,17 +169,17 @@ struct GitInput : Input
|
|||
return url.path;
|
||||
return {};
|
||||
}
|
||||
|
||||
void markChangedFile(std::string_view file) const override
|
||||
void markChangedFile(std::string_view file, std::optional<std::string> commitMsg) const override
|
||||
{
|
||||
auto sourcePath = getSourcePath();
|
||||
assert(sourcePath);
|
||||
|
||||
runProgram("git", true,
|
||||
{ "-C", *sourcePath, "add",
|
||||
"--force",
|
||||
"--intent-to-add",
|
||||
std::string(file)
|
||||
});
|
||||
{ "-C", *sourcePath, "add", "--force", "--intent-to-add", std::string(file) });
|
||||
|
||||
if (commitMsg)
|
||||
runProgram("git", true,
|
||||
{ "-C", *sourcePath, "commit", std::string(file), "-m", *commitMsg });
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> getActualUrl() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue