feat: skip the .git directory

This commit is contained in:
Patrick MARIE 2025-02-05 19:10:01 +01:00
parent 4b0902c648
commit d1f83c18f3
Signed by: mycroft
GPG Key ID: BB519E5CD8E7BFA7

View File

@ -15,6 +15,11 @@ pub fn write_tree(repo_path: &PathBuf, path: &PathBuf) -> Result<[u8; 20]> {
let file_name = file.file_name();
let file_path = file.path();
// Skip the .git directory
if file_name == ".git" {
continue;
}
let hash: [u8; 20];
let kind;