mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-26 03:00:03 +03:00
rename fetch to pull
This commit is contained in:
parent
39fb65b396
commit
bd54b47d19
@ -64,7 +64,7 @@ pub struct KeyConfig {
|
||||
pub delete_branch: KeyEvent,
|
||||
pub push: KeyEvent,
|
||||
pub force_push: KeyEvent,
|
||||
pub fetch: KeyEvent,
|
||||
pub pull: KeyEvent,
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
@ -118,7 +118,7 @@ impl Default for KeyConfig {
|
||||
delete_branch: KeyEvent{code: KeyCode::Char('D'), modifiers: KeyModifiers::SHIFT},
|
||||
push: KeyEvent { code: KeyCode::Char('p'), modifiers: KeyModifiers::empty()},
|
||||
force_push: KeyEvent { code: KeyCode::Char('P'), modifiers: KeyModifiers::SHIFT},
|
||||
fetch: KeyEvent { code: KeyCode::Char('f'), modifiers: KeyModifiers::empty()},
|
||||
pull: KeyEvent { code: KeyCode::Char('f'), modifiers: KeyModifiers::empty()},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -838,4 +838,14 @@ pub mod commands {
|
||||
CMD_GROUP_GENERAL,
|
||||
)
|
||||
}
|
||||
pub fn status_pull(key_config: &SharedKeyConfig) -> CommandText {
|
||||
CommandText::new(
|
||||
format!(
|
||||
"Pull [{}]",
|
||||
key_config.get_hint(key_config.pull),
|
||||
),
|
||||
"fetch/merge",
|
||||
CMD_GROUP_GENERAL,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ impl Status {
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch(&self) {
|
||||
fn pull(&self) {
|
||||
if let Some(branch) = self.git_branch_name.last() {
|
||||
self.queue
|
||||
.borrow_mut()
|
||||
@ -470,6 +470,11 @@ impl Component for Status {
|
||||
self.can_push(),
|
||||
true,
|
||||
));
|
||||
out.push(CommandInfo::new(
|
||||
strings::commands::status_pull(&self.key_config),
|
||||
true,
|
||||
true,
|
||||
));
|
||||
}
|
||||
|
||||
{
|
||||
@ -582,8 +587,8 @@ impl Component for Status {
|
||||
} else if k == self.key_config.push {
|
||||
self.push(false);
|
||||
Ok(true)
|
||||
} else if k == self.key_config.fetch {
|
||||
self.fetch();
|
||||
} else if k == self.key_config.pull {
|
||||
self.pull();
|
||||
Ok(true)
|
||||
} else {
|
||||
Ok(false)
|
||||
|
Loading…
Reference in New Issue
Block a user