refactor(bare): enhance security and performance optimizations
- Remove unnecessary sorting in advertise_refs for deterministic output - Add path traversal detection and validation in bare_dir construction - Implement symlink resolution checks to prevent security vulnerabilities - Refactor cache system with CRC validation and improved metrics - Integrate repo-specific cache invalidation using indexed keys - Add comprehensive unit tests for commit operations and diff functionality - Move configuration constants to centralized config module - Optimize string operations in disk cache random value generation - Enhance license detection algorithm with cleaner matching logic - Streamline argument processing in various git operations - Update dependencies including crc32fast and flate2 for performance - Add signal handling capability to tokio runtime configuration
This commit is contained in:
@@ -30,7 +30,6 @@ impl GitBare {
|
||||
.filter(|hex| !hex.is_empty())
|
||||
.map(|hex| self.oid_to_pb(hex));
|
||||
|
||||
// Count objects
|
||||
let mut object_count = 0u64;
|
||||
if let Some(hash_str) = base_name.strip_prefix("pack-") {
|
||||
let idx_path = pack_dir.join(format!("pack-{hash_str}.idx"));
|
||||
|
||||
Reference in New Issue
Block a user