diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libfetchers/git.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index f8d89ab2f..321950e63 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -7,6 +7,8 @@ #include "pathlocks.hh" #include "util.hh" #include "git.hh" +#include "logging.hh" +#include "finally.hh" #include "fetch-settings.hh" @@ -378,6 +380,9 @@ struct GitInputScheme : InputScheme runProgram("git", true, { "-C", *sourcePath, "--git-dir", gitDir, "add", "--intent-to-add", "--", std::string(file) }); + // Pause the logger to allow for user input (such as a gpg passphrase) in `git commit` + logger->pause(); + Finally restoreLogger([]() { logger->resume(); }); if (commitMsg) runProgram("git", true, { "-C", *sourcePath, "--git-dir", gitDir, "commit", std::string(file), "-m", *commitMsg }); |