gitpane 0.5.3

Multi-repo Git workspace dashboard TUI
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::path::PathBuf;

/// Stable identity for a repository, based on its filesystem path.
/// Unlike positional `usize` indices, a `RepoId` remains valid across
/// repo list mutations (add, remove, sort, rescan).
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub(crate) struct RepoId(pub PathBuf);

impl std::fmt::Display for RepoId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0.display())
    }
}