better naming

This commit is contained in:
Stephan Dilly 2020-04-08 00:03:16 +02:00
parent b71f39fbb3
commit 387b8748b1
3 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ fn find_hunk_index(diff: &Diff, hunk_hash: u64) -> Option<usize> {
}
///
pub fn revert_hunk(
pub fn unstage_hunk(
repo_path: &str,
file_path: String,
hunk_hash: u64,

View File

@ -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};

View File

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