refactor(build): reformat code and add tonic health dependency
- Reformatted build script with proper indentation and line breaks - Added tonic-health dependency to Cargo.toml and updated lock file - Improved error handling in disk cache with concurrent deletion checks - Refactored conditional chains using && and let expressions - Reformatted struct initialization and function parameter lists - Added proper spacing and alignment in language stats processing - Improved assertion formatting in test cases - Reorganized import statements and code layout in multiple files - Updated metrics functions with better parameter handling and formatting
This commit is contained in:
+12
-12
@@ -19,13 +19,13 @@ impl GitBare {
|
||||
let stats = self.get_repository_statistics()?;
|
||||
|
||||
// Run commit-graph write if needed
|
||||
if stats.commit_graph_size_bytes == 0 || strategy == OptimizeStrategy::Aggressive {
|
||||
if let Ok(resp) = write_commit_graph(self, false, false) {
|
||||
if !resp.ok {
|
||||
stderr_all.push_str(&resp.stderr);
|
||||
}
|
||||
stdout_all.push_str(&resp.stdout);
|
||||
if (stats.commit_graph_size_bytes == 0 || strategy == OptimizeStrategy::Aggressive)
|
||||
&& let Ok(resp) = write_commit_graph(self, false, false)
|
||||
{
|
||||
if !resp.ok {
|
||||
stderr_all.push_str(&resp.stderr);
|
||||
}
|
||||
stdout_all.push_str(&resp.stdout);
|
||||
}
|
||||
|
||||
// Repack if many loose objects or packfiles
|
||||
@@ -42,13 +42,13 @@ impl GitBare {
|
||||
}
|
||||
|
||||
// Prune if aggressive
|
||||
if strategy == OptimizeStrategy::Aggressive {
|
||||
if let Ok(resp) = run_gc(self, true, true) {
|
||||
if !resp.ok {
|
||||
stderr_all.push_str(&resp.stderr);
|
||||
}
|
||||
stdout_all.push_str(&resp.stdout);
|
||||
if strategy == OptimizeStrategy::Aggressive
|
||||
&& let Ok(resp) = run_gc(self, true, true)
|
||||
{
|
||||
if !resp.ok {
|
||||
stderr_all.push_str(&resp.stderr);
|
||||
}
|
||||
stdout_all.push_str(&resp.stdout);
|
||||
}
|
||||
}
|
||||
OptimizeStrategy::Incremental => {
|
||||
|
||||
Reference in New Issue
Block a user