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:
@@ -46,9 +46,6 @@ pub fn find_remote_repository(
|
||||
continue;
|
||||
}
|
||||
|
||||
// Lines can be:
|
||||
// SHA<TAB>refname (direct ref)
|
||||
// ref: refs/heads/main<TAB>HEAD (symbolic ref via --symref)
|
||||
if line.starts_with("ref:") {
|
||||
if let Some((target, name)) = line.split_once('\t') {
|
||||
refs.push(RemoteHead {
|
||||
|
||||
@@ -103,7 +103,6 @@ impl GitBare {
|
||||
});
|
||||
}
|
||||
|
||||
// Update local HEAD to match remote HEAD
|
||||
let head_output = std::process::Command::new("git")
|
||||
.args([
|
||||
"--git-dir",
|
||||
|
||||
Reference in New Issue
Block a user