summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service/source_tree.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-08-13 18:01:50 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-08-26 11:36:35 +0200
commita312e71b59340f7b6d8dc5aac9202137ae81d02b (patch)
tree0601795d12487a2d8e4e87704f9592fd00e8bd08 /src/buildtool/serve_api/serve_service/source_tree.cpp
parentd7f6ca59d2e2713efe40c96e2c6522f6d86180d2 (diff)
downloadjustbuild-a312e71b59340f7b6d8dc5aac9202137ae81d02b.tar.gz
GitRepo: Change logic that creates commits to explicitly give directory
In preparation for subsequent changes, specify the directory path containing the tree content to be committed explicitly. This change will allow eventually to be able to specify paths that are different from the root path of the repository in which the commit is created. This commit renames and refactors StageAndCommitAllAnnonymous to allow a directory path to be passed. The just-mr and serve service logic is updated such that current behaviour is otherwise unchanged.
Diffstat (limited to 'src/buildtool/serve_api/serve_service/source_tree.cpp')
-rw-r--r--src/buildtool/serve_api/serve_service/source_tree.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildtool/serve_api/serve_service/source_tree.cpp b/src/buildtool/serve_api/serve_service/source_tree.cpp
index 5de4c389..dd42ab83 100644
--- a/src/buildtool/serve_api/serve_service/source_tree.cpp
+++ b/src/buildtool/serve_api/serve_service/source_tree.cpp
@@ -470,7 +470,7 @@ auto SourceTreeService::CommonImportToGit(
});
// stage and commit all
auto commit_hash =
- git_repo->StageAndCommitAllAnonymous(commit_message, wrapped_logger);
+ git_repo->CommitDirectory(root_path, commit_message, wrapped_logger);
if (not commit_hash) {
return unexpected{err};
}