Move git state to Project (#23208)
This restores its visibility outside of git_ui, which we'll need soon, while preserving its per-project character. Release Notes: - N/A
This commit is contained in:
parent
614eaec278
commit
b7726238ad
10 changed files with 363 additions and 317 deletions
|
@ -7,6 +7,7 @@ pub mod repository;
|
|||
pub mod status;
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use gpui::actions;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::ffi::OsStr;
|
||||
use std::fmt;
|
||||
|
@ -24,6 +25,24 @@ pub static FSMONITOR_DAEMON: LazyLock<&'static OsStr> =
|
|||
LazyLock::new(|| OsStr::new("fsmonitor--daemon"));
|
||||
pub static GITIGNORE: LazyLock<&'static OsStr> = LazyLock::new(|| OsStr::new(".gitignore"));
|
||||
|
||||
actions!(
|
||||
git,
|
||||
[
|
||||
StageFile,
|
||||
UnstageFile,
|
||||
ToggleStaged,
|
||||
// Revert actions are currently in the editor crate:
|
||||
// editor::RevertFile,
|
||||
// editor::RevertSelectedHunks
|
||||
StageAll,
|
||||
UnstageAll,
|
||||
RevertAll,
|
||||
CommitChanges,
|
||||
CommitAllChanges,
|
||||
ClearCommitMessage
|
||||
]
|
||||
);
|
||||
|
||||
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
|
||||
pub struct Oid(libgit::Oid);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue