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)
| 710 | /// `.atomic/changes/AB/CDEF...` where AB is the first two characters of the |
| 711 | /// base32-encoded hash. |
| 712 | pub fn change_path(&self, hash_base32: &str) -> PathBuf { |
| 713 | let prefix = &hash_base32[..2.min(hash_base32.len())]; |
| 714 | self.changes_dir().join(prefix).join(hash_base32) |
| 715 | } |
| 716 | |
| 717 | /// Convert an absolute path to a repository-relative path. |
| 718 | pub fn to_relative<P: AsRef<Path>>(&self, path: P) -> Option<PathBuf> { |