diff --git a/crates/git/src/git.rs b/crates/git/src/git.rs index 7c78249ab3e860e2ca9afa32c43a585a07d10446..ede44d9a135dc8941880521fb7971e55be388279 100644 --- a/crates/git/src/git.rs +++ b/crates/git/src/git.rs @@ -96,11 +96,21 @@ actions!( OpenModifiedFiles, /// Clones a repository. Clone, - /// Renames the current branch. - RenameBranch, ] ); +/// Renames a git branch. +#[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Action)] +#[action(namespace = git)] +#[serde(deny_unknown_fields)] +pub struct RenameBranch { + /// The branch to rename. + /// + /// Default: the current branch. + #[serde(default)] + pub branch: Option, +} + /// Restores a file to its last committed state, discarding local changes. #[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Action)] #[action(namespace = git, deprecated_aliases = ["editor::RevertFile"])]