fix a bunch more typos

This commit is contained in:
extrawurst 2024-02-20 19:51:05 +01:00
parent 5dad9f4adb
commit 2bbaa6f3a1
33 changed files with 97 additions and 87 deletions

View File

@ -212,7 +212,7 @@ Bugfix followup release - check `0.22.0` notes for more infos!
### Added
* stack popups ([#846](https://github.com/extrawurst/gitui/issues/846))
* file history log [[@cruessler](https://github.com/cruessler)] ([#381](https://github.com/extrawurst/gitui/issues/381))
* termux support on andriod [[@PeroSar](https://github.com/PeroSar)] ([#1139](https://github.com/extrawurst/gitui/issues/1139))
* termux support on android [[@PeroSar](https://github.com/PeroSar)] ([#1139](https://github.com/extrawurst/gitui/issues/1139))
* use `GIT_DIR` and `GIT_WORK_DIR` from environment if set ([#1191](https://github.com/extrawurst/gitui/pull/1191))
* new [FAQ](./FAQ.md)s page
* mention macports in install section [[@fs111](https://github.com/fs111)]([#1237](https://github.com/extrawurst/gitui/pull/1237))
@ -648,7 +648,7 @@ Thanks for your interest and support over this year! Read more about the 1 year
- min size for relative popups on small terminals ([#179](https://github.com/extrawurst/gitui/issues/179))
- fix crash on resizing terminal to very small width ([#198](https://github.com/extrawurst/gitui/issues/198))
- fix broken tags when using a different internal representation ([#206](https://github.com/extrawurst/gitui/issues/206))
- tags are not cleanly seperated in details view ([#212](https://github.com/extrawurst/gitui/issues/212))
- tags are not cleanly separated in details view ([#212](https://github.com/extrawurst/gitui/issues/212))
## [0.8.1] - 2020-07-07
@ -814,7 +814,7 @@ Thanks for your interest and support over this year! Read more about the 1 year
### Changed
- show longer commit messages in log view
- introduce propper error handling in `asyncgit` [[@MCord](https://github.com/MCord)]([#53](https://github.com/extrawurst/gitui/issues/53))
- introduce proper error handling in `asyncgit` [[@MCord](https://github.com/MCord)]([#53](https://github.com/extrawurst/gitui/issues/53))
- better error message when trying to run outside of a valid git repo ([#56](https://github.com/extrawurst/gitui/issues/56))
- improve ctrl+c handling so it is checked first and no component needs to worry of blocking it

View File

@ -21,7 +21,7 @@ impl<T: Copy + Send, P: Clone + Send + Sync + PartialEq>
/// send an intermediate update notification.
/// do not confuse this with the return value of `run`.
/// `send` should only be used about progress notifications
/// and not for the final notifcation indicating the end of the async job.
/// and not for the final notification indicating the end of the async job.
/// see `run` for more info
pub fn send(&self, notification: T) -> Result<()> {
self.sender.send(notification)?;
@ -191,10 +191,10 @@ mod test {
value_to_add: u32,
}
type TestNotificaton = ();
type TestNotification = ();
impl AsyncJob for TestJob {
type Notification = TestNotificaton;
type Notification = TestNotification;
type Progress = ();
fn run(

View File

@ -66,7 +66,7 @@ impl RemoteProgress {
Ok(())
}
/// spawn thread to listen to progress notifcations coming in from blocking remote git method (fetch/push)
/// spawn thread to listen to progress notifications coming in from blocking remote git method (fetch/push)
pub(crate) fn spawn_receiver_thread<
T: 'static + AsyncProgress,
>(

View File

@ -263,7 +263,7 @@ mod test {
)
.unwrap();
//this should not have commited cause we left conflicts behind
//this should not have committed cause we left conflicts behind
assert_eq!(res, None);
let state = crate::sync::repo_state(

View File

@ -10,7 +10,7 @@ use crate::{
use git2::BranchType;
use scopetime::scope_time;
/// trys merging current branch with its upstrema using rebase
/// tries merging current branch with its upstream using rebase
pub fn merge_upstream_rebase(
repo_path: &RepoPath,
branch_name: &str,

View File

@ -384,7 +384,7 @@ pub fn checkout_remote_branch(
if let Err(e) = repo.checkout_head(Some(
git2::build::CheckoutBuilder::new().force(),
)) {
// This is safe beacuse cur_ref was just found
// This is safe because cur_ref was just found
repo.set_head(bytes2string(cur_ref.name_bytes())?.as_str())?;
return Err(Error::Git(e));
}

View File

@ -318,7 +318,7 @@ mod tests {
eprintln!("\n----\n{cmd}");
}
/// helper to fetch commmit details using log walker
/// helper to fetch commit details using log walker
pub fn get_commit_ids(
r: &Repository,
max_count: usize,

View File

@ -254,7 +254,7 @@ mod tests {
&format!("git remote add origin {remote_path}")[..],
);
//NOTE: aparently remotes are not chronolically sorted but alphabetically
//NOTE: apparently remotes are not chronolically sorted but alphabetically
let remotes = get_remotes(repo_path).unwrap();
assert_eq!(

View File

@ -49,7 +49,7 @@ fn get_current_branch(
/// Changes the commit message of a commit with a specified oid
///
/// While this function is most commonly associated with doing a
/// reword opperation in an interactive rebase, that is not how it
/// reword operation in an interactive rebase, that is not how it
/// is implemented in git2rs
///
/// This is dangerous if it errors, as the head will be detached so this should

View File

@ -100,13 +100,13 @@ pub(crate) fn apply_selection(
};
if !first_hunk_encountered {
let any_slection_in_hunk =
let any_selection_in_hunk =
hunk.lines.iter().any(|line| {
let line: DiffLinePosition = line.into();
lines.contains(&line)
});
first_hunk_encountered = any_slection_in_hunk;
first_hunk_encountered = any_selection_in_hunk;
}
if first_hunk_encountered {

View File

@ -213,7 +213,7 @@ mod tests {
}
#[test]
fn test_stash_without_2nd_parent() -> Result<()> {
fn test_stash_without_second_parent() -> Result<()> {
let file_path1 = Path::new("file1.txt");
let (_td, repo) = repo_init()?;
let root = repo.path().parent().unwrap();

View File

@ -126,7 +126,7 @@ pub fn is_workdir_clean(
Ok(statuses.is_empty())
}
/// gurantees sorting
/// guarantees sorting
pub fn get_status(
repo_path: &RepoPath,
status_type: StatusType,

View File

@ -590,7 +590,7 @@ mod tests {
assert_eq!(it.next(), None);
}
pub fn get_visibles(tree: &FileTreeItems) -> Vec<bool> {
pub fn get_visible(tree: &FileTreeItems) -> Vec<bool> {
tree.tree_items
.iter()
.map(|e| e.info().is_visible())
@ -614,7 +614,7 @@ mod tests {
tree.collapse(1, false);
let visibles = get_visibles(&tree);
let visibles = get_visible(&tree);
assert_eq!(
visibles,
@ -628,7 +628,7 @@ mod tests {
tree.expand(1, false);
let visibles = get_visibles(&tree);
let visibles = get_visible(&tree);
assert_eq!(
visibles,
@ -661,7 +661,7 @@ mod tests {
tree.collapse(0, false);
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
false, //
@ -674,7 +674,7 @@ mod tests {
tree.expand(0, false);
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
true, //
@ -702,7 +702,7 @@ mod tests {
tree.collapse(0, false);
let visibles = get_visibles(&tree);
let visibles = get_visible(&tree);
assert_eq!(
visibles,
@ -732,7 +732,7 @@ mod tests {
tree.collapse(1, false);
let visibles = get_visibles(&tree);
let visibles = get_visible(&tree);
assert_eq!(
visibles,
@ -746,7 +746,7 @@ mod tests {
tree.collapse(0, false);
let visibles = get_visibles(&tree);
let visibles = get_visible(&tree);
assert_eq!(
visibles,
@ -760,10 +760,10 @@ mod tests {
tree.expand(0, false);
let visibles = get_visibles(&tree);
let visible = get_visible(&tree);
assert_eq!(
visibles,
visible,
vec![
true, //
true, //
@ -799,7 +799,7 @@ mod tests {
assert!(!tree.tree_items[3].kind().is_path_collapsed());
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
true, //
@ -828,7 +828,7 @@ mod tests {
tree.collapse(0, true);
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
false, //
@ -840,7 +840,7 @@ mod tests {
assert_eq!(res, 2);
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
true, //
@ -872,7 +872,7 @@ mod tests {
assert_eq!(res, 4);
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
true, //
@ -898,7 +898,7 @@ mod tests {
tree.collapse(0, true);
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
false, //
@ -911,7 +911,7 @@ mod tests {
assert!(!tree.tree_items[0].kind().is_path_collapsed());
assert_eq!(
get_visibles(&tree),
get_visible(&tree),
vec![
true, //
true, //

View File

@ -72,8 +72,8 @@ impl ChangesComponent {
}
///
pub fn is_file_seleted(&self) -> bool {
self.files.is_file_seleted()
pub fn is_file_selected(&self) -> bool {
self.files.is_file_selected()
}
fn index_add_remove(&mut self) -> Result<bool> {

View File

@ -184,7 +184,7 @@ impl DetailsComponent {
if let Some(ref committer) = data.committer {
res.extend(vec![
Line::from(vec![
style_detail(&self.theme, &Detail::Commiter),
style_detail(&self.theme, &Detail::Committer),
Span::styled(
Cow::from(format!(
"{} <{}>",

View File

@ -5,7 +5,7 @@ use std::borrow::Cow;
pub enum Detail {
Author,
Date,
Commiter,
Committer,
Sha,
Message,
}
@ -23,7 +23,7 @@ pub fn style_detail<'a>(
Cow::from(strings::commit::details_date()),
theme.text(false, false),
),
Detail::Commiter => Span::styled(
Detail::Committer => Span::styled(
Cow::from(strings::commit::details_committer()),
theme.text(false, false),
),

View File

@ -119,7 +119,7 @@ impl StatusTreeComponent {
}
///
pub fn is_file_seleted(&self) -> bool {
pub fn is_file_selected(&self) -> bool {
self.tree.selected_item().map_or(false, |item| {
match item.kind {
FileTreeItemKind::File(_) => true,

View File

@ -109,7 +109,7 @@ impl ItemBatch {
self.items.iter()
}
/// clear curent list of items
/// clear current list of items
pub fn clear(&mut self) {
self.items.clear();
self.index_offset = None;

View File

@ -26,7 +26,7 @@ macro_rules! try_or_popup {
};
}
/// helper func to convert unix time since epoch to formated time string in local timezone
/// helper func to convert unix time since epoch to formatted time string in local timezone
pub fn time_to_string(secs: i64, short: bool) -> String {
let time = DateTime::<Local>::from(
DateTime::<Utc>::from_naive_utc_and_offset(

View File

@ -444,7 +444,7 @@ mod tests {
.collect::<Vec<_>>()
}
fn get_visibles(tree: &StatusTree) -> Vec<bool> {
fn get_visible(tree: &StatusTree) -> Vec<bool> {
tree.tree
.items()
.iter()
@ -503,7 +503,7 @@ mod tests {
res.update(&string_vec_to_status(&["a/b"])).unwrap();
assert_eq!(
get_visibles(&res),
get_visible(&res),
vec![
true, //
false, //
@ -533,7 +533,7 @@ mod tests {
);
assert_eq!(
get_visibles(&res),
get_visible(&res),
vec![
true, //
false, //
@ -554,7 +554,7 @@ mod tests {
);
assert_eq!(
get_visibles(&res),
get_visible(&res),
vec![
true, //
false, //
@ -581,10 +581,10 @@ mod tests {
res.collapse(&String::from("a/b"), 1);
let visibles = get_visibles(&res);
let visible = get_visible(&res);
assert_eq!(
visibles,
visible,
vec![
true, //
true, //
@ -595,10 +595,10 @@ mod tests {
res.expand(&String::from("a/b"), 1);
let visibles = get_visibles(&res);
let visible = get_visible(&res);
assert_eq!(
visibles,
visible,
vec![
true, //
true, //
@ -628,7 +628,7 @@ mod tests {
res.collapse(&String::from("a"), 0);
assert_eq!(
get_visibles(&res),
get_visible(&res),
vec![
true, //
false, //
@ -641,7 +641,7 @@ mod tests {
res.expand(&String::from("a"), 0);
assert_eq!(
get_visibles(&res),
get_visible(&res),
vec![
true, //
true, //
@ -669,10 +669,10 @@ mod tests {
res.collapse(&String::from("a"), 0);
let visibles = get_visibles(&res);
let visible = get_visible(&res);
assert_eq!(
visibles,
visible,
vec![
true, //
false, //
@ -699,10 +699,10 @@ mod tests {
res.collapse(&String::from("a/b"), 1);
let visibles = get_visibles(&res);
let visible = get_visible(&res);
assert_eq!(
visibles,
visible,
vec![
true, //
true, //
@ -713,10 +713,10 @@ mod tests {
res.collapse(&String::from("a"), 0);
let visibles = get_visibles(&res);
let visible = get_visible(&res);
assert_eq!(
visibles,
visible,
vec![
true, //
false, //
@ -727,10 +727,10 @@ mod tests {
res.expand(&String::from("a"), 0);
let visibles = get_visibles(&res);
let visible = get_visible(&res);
assert_eq!(
visibles,
visible,
vec![
true, //
true, //

View File

@ -85,8 +85,8 @@ pub struct KeysList {
pub log_tag_commit: GituiKeyEvent,
pub log_mark_commit: GituiKeyEvent,
pub log_checkout_commit: GituiKeyEvent,
pub log_reset_comit: GituiKeyEvent,
pub log_reword_comit: GituiKeyEvent,
pub log_reset_commit: GituiKeyEvent,
pub log_reword_commit: GituiKeyEvent,
pub log_find: GituiKeyEvent,
pub find_commit_sha: GituiKeyEvent,
pub commit_amend: GituiKeyEvent,
@ -176,8 +176,8 @@ impl Default for KeysList {
log_tag_commit: GituiKeyEvent::new(KeyCode::Char('t'), KeyModifiers::empty()),
log_mark_commit: GituiKeyEvent::new(KeyCode::Char(' '), KeyModifiers::empty()),
log_checkout_commit: GituiKeyEvent { code: KeyCode::Char('S'), modifiers: KeyModifiers::SHIFT },
log_reset_comit: GituiKeyEvent { code: KeyCode::Char('R'), modifiers: KeyModifiers::SHIFT },
log_reword_comit: GituiKeyEvent { code: KeyCode::Char('r'), modifiers: KeyModifiers::empty() },
log_reset_commit: GituiKeyEvent { code: KeyCode::Char('R'), modifiers: KeyModifiers::SHIFT },
log_reword_commit: GituiKeyEvent { code: KeyCode::Char('r'), modifiers: KeyModifiers::empty() },
log_find: GituiKeyEvent { code: KeyCode::Char('f'), modifiers: KeyModifiers::empty() },
find_commit_sha: GituiKeyEvent::new(KeyCode::Char('j'), KeyModifiers::CONTROL),
commit_amend: GituiKeyEvent::new(KeyCode::Char('a'), KeyModifiers::CONTROL),

View File

@ -24,7 +24,7 @@ struct OptionsData {
pub commit_msgs: Vec<String>,
}
const COMMIT_MSG_HISTRY_LENGTH: usize = 20;
const COMMIT_MSG_HISTORY_LENGTH: usize = 20;
#[derive(Clone)]
pub struct Options {
@ -109,7 +109,8 @@ impl Options {
pub fn add_commit_msg(&mut self, msg: &str) {
self.data.commit_msgs.push(msg.to_owned());
while self.data.commit_msgs.len() > COMMIT_MSG_HISTRY_LENGTH {
while self.data.commit_msgs.len() > COMMIT_MSG_HISTORY_LENGTH
{
self.data.commit_msgs.remove(0);
}
self.save();

View File

@ -36,7 +36,7 @@ use std::{
use super::ExternalEditorPopup;
enum CommitResult {
ComitDone,
CommitDone,
Aborted,
}
@ -172,7 +172,7 @@ impl CommitPopup {
.as_bytes(),
)?;
file.write_all(b"\n#\n# Changes to be commited:")?;
file.write_all(b"\n#\n# Changes to be committed:")?;
for change in changes {
let status_char =
@ -218,7 +218,7 @@ impl CommitPopup {
if matches!(
self.commit_with_msg(msg)?,
CommitResult::ComitDone
CommitResult::CommitDone
) {
self.options
.borrow_mut()
@ -279,7 +279,7 @@ impl CommitPopup {
)));
}
Ok(CommitResult::ComitDone)
Ok(CommitResult::CommitDone)
}
fn do_commit(&self, msg: &str) -> Result<()> {

View File

@ -187,7 +187,7 @@ impl FuzzyFindPopup {
.iter()
.skip(scroll_skip)
.take(height)
.map(|(idx, indicies)| {
.map(|(idx, indices)| {
let selected = self
.selected_index
.map_or(false, |index| index == *idx);
@ -205,7 +205,7 @@ impl FuzzyFindPopup {
Cow::from(c.to_string()),
self.theme.text(
selected,
indicies.contains(
indices.contains(
&(c_idx + trim_length),
),
),

View File

@ -245,7 +245,7 @@ impl LogSearchPopupPopup {
),
)]),
Line::from(vec![Span::styled(
format!("[{x_files}] commited files",),
format!("[{x_files}] committed files",),
self.theme.text(
matches!(
self.selection,

View File

@ -318,10 +318,10 @@ impl SubmodulesListPopup {
fn set_selection(&mut self, selection: u16) -> Result<()> {
let num_entriess: u16 = self.submodules.len().try_into()?;
let num_entriess = num_entriess.saturating_sub(1);
let num_entries = num_entriess.saturating_sub(1);
let selection = if selection > num_entriess {
num_entriess
let selection = if selection > num_entries {
num_entries
} else {
selection
};

View File

@ -83,7 +83,7 @@ impl DrawableComponent for TagListPopup {
Constraint::Length(10),
// author width
Constraint::Length(19),
// attachement
// attachment
Constraint::Length(1),
// commit id
Constraint::Percentage(100),
@ -443,7 +443,7 @@ impl TagListPopup {
///
fn get_row(&self, tag: &TagWithMetadata) -> Row {
const UPSTREAM_SYMBOL: &str = "\u{2191}";
const ATTACHEMENT_SYMBOL: &str = "@";
const ATTACHMENT_SYMBOL: &str = "@";
const EMPTY_SYMBOL: &str = " ";
let is_tag_missing_on_remote = self
@ -462,7 +462,7 @@ impl TagListPopup {
};
let has_attachement_str = if tag.annotation.is_some() {
ATTACHEMENT_SYMBOL
ATTACHMENT_SYMBOL
} else {
EMPTY_SYMBOL
};

View File

@ -1356,7 +1356,7 @@ pub mod commands {
CommandText::new(
format!(
"Reset [{}]",
key_config.get_hint(key_config.keys.log_reset_comit),
key_config.get_hint(key_config.keys.log_reset_commit),
),
"reset to commit",
CMD_GROUP_LOG,
@ -1368,7 +1368,8 @@ pub mod commands {
CommandText::new(
format!(
"Reword [{}]",
key_config.get_hint(key_config.keys.log_reword_comit),
key_config
.get_hint(key_config.keys.log_reword_commit),
),
"reword commit message",
CMD_GROUP_LOG,

View File

@ -542,7 +542,7 @@ impl Component for Revlog {
return Ok(EventState::Consumed);
} else if key_match(
k,
self.key_config.keys.log_reset_comit,
self.key_config.keys.log_reset_commit,
) && !self.is_search_pending()
{
return self.selected_commit().map_or(
@ -556,7 +556,7 @@ impl Component for Revlog {
);
} else if key_match(
k,
self.key_config.keys.log_reword_comit,
self.key_config.keys.log_reword_commit,
) && !self.is_search_pending()
{
return self.selected_commit().map_or(

View File

@ -311,8 +311,8 @@ impl Status {
fn can_focus_diff(&self) -> bool {
match self.focus {
Focus::WorkDir => self.index_wd.is_file_seleted(),
Focus::Stage => self.index.is_file_seleted(),
Focus::WorkDir => self.index_wd.is_file_selected(),
Focus::Stage => self.index.is_file_selected(),
Focus::Diff => false,
}
}

View File

@ -144,7 +144,7 @@ pub struct LineTruncator<'a, 'b> {
symbols: &'b mut dyn Iterator<Item = StyledGrapheme<'a>>,
max_line_width: u16,
current_line: Vec<StyledGrapheme<'a>>,
/// Record the offet to skip render
/// Record the offset to skip render
horizontal_offset: u16,
}
@ -509,7 +509,7 @@ mod test {
assert_eq!(line_truncator, vec![" "]);
}
/// Tests an input starting with a letter, folowed by spaces - some of the behaviour is
/// Tests an input starting with a letter, followed by spaces - some of the behaviour is
/// incidental.
#[test]
fn line_composer_char_plus_lots_of_spaces() {

View File

@ -0,0 +1,8 @@
# configuration for https://github.com/crate-ci/typos
[default.extend-words]
ratatui = "ratatui"
syntact = "syntact"
[files]
extend-exclude = ["CHANGELOG.md"]

View File

@ -175,7 +175,7 @@
<!--
Uncomment the next `WixVaraible` tag to customize the installer's
Uncomment the next `WixVariable` tag to customize the installer's
Graphical User Interface (GUI) and add a custom banner image across
the top of each screen. See the WiX Toolset documentation for details
about customization.