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) {