Skip to content

Commit

Permalink
Remove the gps add command
Browse files Browse the repository at this point in the history
Remove the gps add command because we are trying to reduce the surface
area of the commands and this command is simply a proxy command that
existed so people wouldn't have to leave the gps interface. However, we
are now shifting away from that mindset and more toward the mindset of
supporting switching seamlessly between git and gps commands.

[changelog]
removed: the add command

<!-- ps-id: cdfe7354-0f7b-4a32-80c9-62e390b458b1 -->
  • Loading branch information
drewdeponte committed Oct 20, 2023
1 parent 9261a98 commit cf5da6e
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 188 deletions.
103 changes: 0 additions & 103 deletions doc/gps-add.1

This file was deleted.

21 changes: 0 additions & 21 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,6 @@ pub struct CheckoutCmdOpts {
pub patch_index: usize,
}

#[derive(Debug, Args)]
pub struct AddCmdOpts {
/// interactive picking
#[arg(short = 'i', long = "interactive")]
pub interactive: bool,
/// select hunks interactively
#[arg(short = 'p', long = "patch")]
pub patch: bool,
/// edit current diff and apply
#[arg(short = 'e', long = "edit")]
pub edit: bool,
/// add changes from all tracked and untracked files
#[arg(short = 'A', long = "all")]
pub all: bool,
/// specific files to add changes from, . for all files
pub files: Vec<String>,
}

#[derive(Debug, Args)]
pub struct RebaseCmdOpts {
/// continue a rebase that was paused
Expand Down Expand Up @@ -292,9 +274,6 @@ stack.
#[command(name = "status", alias = "s")]
Status,

/// add changes to the stage (a.k.a stage local changes)
Add(AddCmdOpts),

/// display a log of integrated patches
Log,

Expand Down
17 changes: 0 additions & 17 deletions src/commands/add_changes_to_stage.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// it's respective command modules and exposing them externally. All code
// related to these responsibilities belongs here.

pub mod add_changes_to_stage;
pub mod amend_patch;
pub mod backup_stack;
pub mod batch_request_review;
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ extern crate lazy_static;
mod ps;

pub use ps::private::config::{get_config, GetConfigError, PsConfig};
pub use ps::public::add_changes_to_stage::add_changes_to_stage;
pub use ps::public::amend_patch::amend_patch;
pub use ps::public::backup_stack::backup_stack;
pub use ps::public::batch_request_review::{batch_request_review, BatchRequestReviewError};
Expand Down
7 changes: 0 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ fn main() {
cli::Command::CreatePatch => commands::create_patch::create_patch(),
cli::Command::AmendPatch(opts) => commands::amend_patch::amend_patch(opts.no_edit),
cli::Command::Status => commands::status::status(),
cli::Command::Add(opts) => commands::add_changes_to_stage::add_changes_to_stage(
opts.interactive,
opts.patch,
opts.edit,
opts.all,
opts.files,
),
cli::Command::Log => commands::log::log(),
cli::Command::Unstage(opts) => commands::unstage::unstage(opts.files),
cli::Command::UpstreamPatches => commands::upstream_patches::upstream_patches(cli.color),
Expand Down
37 changes: 0 additions & 37 deletions src/ps/public/add_changes_to_stage.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/ps/public/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod add_changes_to_stage;
pub mod amend_patch;
pub mod backup_stack;
pub mod batch_request_review;
Expand Down

0 comments on commit cf5da6e

Please sign in to comment.