Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-vcs/src/status.rs')
| -rw-r--r-- | helix-vcs/src/status.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/helix-vcs/src/status.rs b/helix-vcs/src/status.rs deleted file mode 100644 index 0240cad1..00000000 --- a/helix-vcs/src/status.rs +++ /dev/null @@ -1,30 +0,0 @@ -use std::path::{Path, PathBuf}; - -/// States for a file having been changed. -pub enum FileChange { - /// Not tracked by the VCS. - Untracked { path: PathBuf }, - /// File has been modified. - Modified { path: PathBuf }, - /// File modification is in conflict with a different update. - Conflict { path: PathBuf }, - /// File has been deleted. - Deleted { path: PathBuf }, - /// File has been renamed. - Renamed { - from_path: PathBuf, - to_path: PathBuf, - }, -} - -impl FileChange { - pub fn path(&self) -> &Path { - match self { - Self::Untracked { path } => path, - Self::Modified { path } => path, - Self::Conflict { path } => path, - Self::Deleted { path } => path, - Self::Renamed { to_path, .. } => to_path, - } - } -} |