Also fixed diff load looping when using LFS, which produces files in .git dir to change
Refactored to use a rust implementation instead of the java impl, because the java impl has been unrelible in linux and macos