From 387b8748b13d1166028e020f57540bdbf5f2a31d Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Wed, 8 Apr 2020 00:03:16 +0200 Subject: [PATCH] better naming --- asyncgit/src/sync/hunks.rs | 2 +- asyncgit/src/sync/mod.rs | 2 +- src/app.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/asyncgit/src/sync/hunks.rs b/asyncgit/src/sync/hunks.rs index 3fdda32e..73d587bb 100644 --- a/asyncgit/src/sync/hunks.rs +++ b/asyncgit/src/sync/hunks.rs @@ -56,7 +56,7 @@ fn find_hunk_index(diff: &Diff, hunk_hash: u64) -> Option { } /// -pub fn revert_hunk( +pub fn unstage_hunk( repo_path: &str, file_path: String, hunk_hash: u64, diff --git a/asyncgit/src/sync/mod.rs b/asyncgit/src/sync/mod.rs index b35f4b8f..0217a35a 100644 --- a/asyncgit/src/sync/mod.rs +++ b/asyncgit/src/sync/mod.rs @@ -6,7 +6,7 @@ mod reset; pub mod status; pub mod utils; -pub use hunks::{revert_hunk, stage_hunk}; +pub use hunks::{stage_hunk, unstage_hunk}; pub use reset::{reset_stage, reset_workdir}; pub use utils::{commit, stage_add}; diff --git a/src/app.rs b/src/app.rs index 3bf613a9..9576ed21 100644 --- a/src/app.rs +++ b/src/app.rs @@ -294,7 +294,7 @@ impl App { InternalEvent::AddHunk(hash) => { if let Some((path, is_stage)) = self.selected_path() { if is_stage { - if sync::revert_hunk(CWD, path, *hash) { + if sync::unstage_hunk(CWD, path, *hash) { self.update(); } } else if sync::stage_hunk(CWD, path, *hash) {