Git actions v2 (#25197)
Closes #ISSUE Release Notes: - Rename `editor::RevertSelectedHunks` and `editor::RevertFile` to `git::Restore` and `git::RestoreFile` for consistency with git
This commit is contained in:
parent
e3836712d6
commit
d0f7dede79
12 changed files with 195 additions and 1688 deletions
|
@ -6,6 +6,7 @@ pub mod repository;
|
|||
pub mod status;
|
||||
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use gpui::action_with_deprecated_aliases;
|
||||
use gpui::actions;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::ffi::OsStr;
|
||||
|
@ -29,21 +30,24 @@ pub static INDEX_LOCK: LazyLock<&'static OsStr> = LazyLock::new(|| OsStr::new("i
|
|||
actions!(
|
||||
git,
|
||||
[
|
||||
// per-hunk
|
||||
ToggleStaged,
|
||||
StageAndNext,
|
||||
UnstageAndNext,
|
||||
// per-file
|
||||
StageFile,
|
||||
UnstageFile,
|
||||
ToggleStaged,
|
||||
// Revert actions are currently in the editor crate:
|
||||
// editor::RevertFile,
|
||||
// editor::RevertSelectedHunks
|
||||
// repo-wide
|
||||
StageAll,
|
||||
UnstageAll,
|
||||
DiscardTrackedChanges,
|
||||
RestoreTrackedFiles,
|
||||
TrashUntrackedFiles,
|
||||
Uncommit,
|
||||
Commit,
|
||||
ClearCommitMessage
|
||||
]
|
||||
);
|
||||
action_with_deprecated_aliases!(git, RestoreFile, ["editor::RevertFile"]);
|
||||
action_with_deprecated_aliases!(git, Restore, ["editor::RevertSelectedHunks"]);
|
||||
|
||||
/// The length of a Git short SHA.
|
||||
pub const SHORT_SHA_LENGTH: usize = 7;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue