From 8220da8a53da6ff1f3f89587c3ba8e0759fd2e80 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 12 May 2024 16:42:43 -0400 Subject: [PATCH] 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 --- src/libfetchers/git.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } }