aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers')
-rw-r--r--src/libfetchers/git.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc
index 0cb826075..f2d577914 100644
--- a/src/libfetchers/git.cc
+++ b/src/libfetchers/git.cc
@@ -396,12 +396,15 @@ struct GitInputScheme : InputScheme
if (commitMsg) {
+ auto [_fd, msgPath] = createTempFile("nix-msg");
+ AutoDelete const _delete{msgPath};
+ writeFile(msgPath, *commitMsg);
+
// Pause the logger to allow for user input (such as a gpg passphrase) in `git commit`
logger->pause();
Finally restoreLogger([]() { logger->resume(); });
runProgram("git", true,
- { "-C", *root, "--git-dir", gitDir, "commit", std::string(path.rel()), "-F", "-" },
- *commitMsg);
+ { "-C", *root, "--git-dir", gitDir, "commit", std::string(path.rel()), "-F", msgPath });
}
}
}