vig 0.8.0

Git TUI side-by-side diff viewer
1
2
3
4
5
6
7
8
9
10
11
use crate::core::app::Page;
use crate::core::config::Config;
use crate::worktrees::state::WorktreesState;
use anyhow::Result;
use std::path::Path;

/// Create the Worktrees page for the repository whose working directory is
/// `root` (the worktree vig runs in; it is highlighted in the list).
pub fn new_page(root: &Path, cfg: &Config) -> Result<Page> {
    Ok(Page::new(WorktreesState::new(root, cfg)?))
}