Skip to content

Commit

Permalink
remove git2 impl of push/fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
altsem committed Feb 25, 2024
1 parent 15c6971 commit c8ed4e5
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 364 deletions.
71 changes: 0 additions & 71 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ criterion = "0.5.1"
pprof = { version = "0.13.0", features = ["flamegraph", "criterion"] }

[dependencies]
auth-git2 = "0.5.3"
chrono = "0.4.34"
clap = { version = "4.5.1", features = ["derive"] }
crossterm = "0.27.0"
Expand Down
7 changes: 6 additions & 1 deletion src/git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub(crate) mod commit;
pub(crate) mod diff;
pub(crate) mod merge_status;
pub(crate) mod rebase_status;
pub(crate) mod remote;

// TODO Use only plumbing commands

Expand Down Expand Up @@ -276,6 +275,12 @@ pub(crate) fn commit_amend_cmd() -> Command {
pub(crate) fn commit_fixup_cmd(reference: &str) -> Command {
git(&["commit", "--fixup", reference])
}
pub(crate) fn fetch_all_cmd() -> Command {
git(&["fetch", "--all"])
}
pub(crate) fn push_cmd() -> Command {
git(&["push"])
}
pub(crate) fn pull_cmd() -> Command {
git(&["pull"])
}
Expand Down
104 changes: 0 additions & 104 deletions src/git/remote.rs

This file was deleted.

14 changes: 6 additions & 8 deletions src/keybinds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,15 @@ pub(crate) const KEYBINDS: &[Keybind] = &[
// Fetch
Keybind::nomod(None, Char('f'), Submenu(Fetch)),
Keybind::nomod(Fetch, Char('a'), FetchAll),
Keybind::nomod(Fetch, Char('u'), FetchUpstream),
// Log
Keybind::nomod(None, Char('l'), Submenu(Log)),
Keybind::nomod(Log, Char('l'), LogCurrent),
// Pull
Keybind::shift(None, Char('F'), Submenu(Pull)),
Keybind::nomod(Pull, Char('u'), PullUpstream),
Keybind::shift(None, Char('F'), Submenu(SubmenuOp::Pull)),
Keybind::nomod(SubmenuOp::Pull, Char('p'), Op::Pull),
// Push
Keybind::shift(None, Char('P'), Submenu(Push)),
Keybind::nomod(Push, Char('u'), PushUpstream),
Keybind::shift(None, Char('P'), Submenu(SubmenuOp::Push)),
Keybind::nomod(SubmenuOp::Push, Char('p'), Op::Push),
// Rebase
Keybind::nomod(None, Char('r'), Submenu(Rebase)),
Keybind::nomod(Rebase, Char('i'), Target(RebaseInteractive)),
Expand Down Expand Up @@ -139,13 +138,12 @@ pub(crate) enum Op {
ToggleSection,
HalfPageUp,
HalfPageDown,
PushUpstream,
PullUpstream,
Push,
Pull,
Submenu(SubmenuOp),
Commit,
CommitAmend,
FetchAll,
FetchUpstream,
LogCurrent,
RebaseAbort,
RebaseContinue,
Expand Down
Loading

0 comments on commit c8ed4e5

Please sign in to comment.