Get the path where a change file should be stored. Changes are stored in a two-level directory structure based on their hash: `.atomic/changes/AB/CDEF...` where AB is the first two characters of the base32-encoded hash.
(&self, hash_base32: &str)
| 754 | /// `.atomic/changes/AB/CDEF...` where AB is the first two characters of the |
| 755 | /// base32-encoded hash. |
| 756 | pub fn change_path(&self, hash_base32: &str) -> PathBuf { |
| 757 | let prefix = &hash_base32[..2.min(hash_base32.len())]; |
| 758 | self.changes_dir().join(prefix).join(hash_base32) |
| 759 | } |
| 760 | |
| 761 | /// Convert an absolute path to a repository-relative path. |
| 762 | pub fn to_relative<P: AsRef<Path>>(&self, path: P) -> Option<PathBuf> { |