summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_repo.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-04-04 12:11:50 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-04-10 14:06:21 +0200
commit350b462340293508260ddb901df3a8a825a13f2d (patch)
tree148d88a9c2de61c944e246252708dae1e4964b7e /src/buildtool/file_system/git_repo.cpp
parent0afc1de20d04a62306084fc0355d7754ad7edf44 (diff)
downloadjustbuild-350b462340293508260ddb901df3a8a825a13f2d.tar.gz
git_repo: Improve error message for CreateTree
Diffstat (limited to 'src/buildtool/file_system/git_repo.cpp')
-rw-r--r--src/buildtool/file_system/git_repo.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buildtool/file_system/git_repo.cpp b/src/buildtool/file_system/git_repo.cpp
index 253adad1..c0774971 100644
--- a/src/buildtool/file_system/git_repo.cpp
+++ b/src/buildtool/file_system/git_repo.cpp
@@ -1749,9 +1749,11 @@ auto GitRepo::CreateTree(tree_entries_t const& entries) const noexcept
entry.name.c_str(),
&(*id),
ObjectTypeToGitFileMode(entry.type)) != 0) {
- Logger::Log(LogLevel::Debug,
- "failed adding object {} to Git tree",
- ToHexString(raw_id));
+ Logger::Log(
+ LogLevel::Debug,
+ "failed adding object {} to Git tree{}",
+ ToHexString(raw_id),
+ id ? fmt::format(" with:\n{}", GitLastError()) : "");
return std::nullopt;
}
}