aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/git.cc
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2024-05-12 16:42:43 -0400
committerMaximilian Bosch <maximilian@mbosch.me>2024-05-20 13:51:29 +0200
commit8220da8a53da6ff1f3f89587c3ba8e0759fd2e80 (patch)
tree17c8cfa09581c10d0680134a2ea30144e48418a7 /src/libfetchers/git.cc
parent992c63fc0b485e571714eabe28e956f10e865a89 (diff)
git putFile: support flake maximalists
Passing the commit message as an argument causes update failures on repositories with lots of flake inputs. In some cases, the commit message is over 250,000 bytes. Upstream PR: https://github.com/NixOS/nix/pull/10686 (cherry picked from commit 8b5e8f4fba5728f2b3e90fcd1ab15df77e3ea0e8) Change-Id: I2c196a21cc9bedc24d57a828a0c5b9467e072f76
Diffstat (limited to 'src/libfetchers/git.cc')
-rw-r--r--src/libfetchers/git.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc
index 671779f84..4d4bf6cd6 100644
--- a/src/libfetchers/git.cc
+++ b/src/libfetchers/git.cc
@@ -402,7 +402,8 @@ struct GitInputScheme : InputScheme
logger->pause();
Finally restoreLogger([]() { logger->resume(); });
runProgram("git", true,
- { "-C", *root, "--git-dir", gitDir, "commit", std::string(path.rel()), "-m", *commitMsg });
+ { "-C", *root, "--git-dir", gitDir, "commit", std::string(path.rel()), "-F", "-" },
+ *commitMsg);
}
}
}