mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance git integration and optimize change detection in ServeSession
- Introduced a new function to retrieve the current HEAD commit SHA, allowing for better tracking of changes in the git repository. - Updated the `git_changed_files` function to accept an initial HEAD parameter, improving the accuracy of change detection. - Modified `ServeSession` to store the initial HEAD commit SHA at session start, ensuring committed changes are reflected in the auto-selection logic. - Enhanced tests to verify that committed changes after session start are correctly identified and included in the change tracking. These changes aim to improve the synchronization process with git and enhance the user experience by ensuring accurate change detection.
This commit is contained in:
parent
7d08b8990f
commit
cd87c63a89
5 changed files with 219 additions and 29 deletions
|
|
@ -379,7 +379,11 @@ impl ApiService {
|
|||
};
|
||||
|
||||
let git_metadata = self.serve_session.git_repo_root().map(|repo_root| {
|
||||
crate::git::compute_git_metadata(&self.serve_session.tree_handle(), repo_root)
|
||||
crate::git::compute_git_metadata(
|
||||
&self.serve_session.tree_handle(),
|
||||
repo_root,
|
||||
self.serve_session.initial_head_commit(),
|
||||
)
|
||||
});
|
||||
|
||||
msgpack_ok(&ServerInfoResponse {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue