Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Apr 10, 2024
1 parent b7ab287 commit f72ecce
Show file tree
Hide file tree
Showing 27 changed files with 62 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .gov/info.yml
Expand Up @@ -8,6 +8,6 @@ maintainers:
- push directly to 'main' branch
- reviews or suggestions by other maintainers if PRs are used
- co-ownership of contributed crates
- reveive sponsorship via GitHub from project page
- receive sponsorship via GitHub from project page


2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -64,7 +64,7 @@ small = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend"
## This build is more of a demonstration showing how async can work with `gitoxide`, which generally is blocking. This also means that the selection of async transports
## is very limited to only HTTP (without typical `git` configuration) and git over TCP like provided by the `git daemon`.
##
## As fast as possible, progress line rendering, less feature-ful HTTP (pure Rust) and only `git-damon` support, all `ein` tools, CLI colors and local-time support, JSON output.
## As fast as possible, progress line rendering, less featureful HTTP (pure Rust) and only `git-daemon` support, all `ein` tools, CLI colors and local-time support, JSON output.
##
## Due to async client-networking not being implemented for most transports, this one supports only the 'git+tcp' and HTTP transport.
## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports.
Expand Down
37 changes: 25 additions & 12 deletions _typos.toml
@@ -1,19 +1,32 @@
[default]
extend-ignore-identifiers-re = [
"[a-f0-9]{7,}",
"[Ff][Oo][Oo]",
"[a-zA-Z0-9]{20,}",
]

[files]
extend-exclude = [
"**/CHANGELOG.md",
"**/tests/fixtures/**",
"*.response",
"etc/corpus/repo_metadata.sample.jsonl",
"gix-config/benches/large_config_file.rs",
"gix-glob/tests/wildmatch/mod.rs"
"gix-config/tests/fixtures/clusterfuzz-testcase-minimized-gix-config-parse-6431708583690240",
"gix-glob/tests/wildmatch/mod.rs",
"gix-path/tests/fixtures/fuzzed/54k-path-components.path",
]
ignore-hidden = false

[default]
extend-ignore-re = [
# PGP signature
"[0-9A-Za-z+=]{44,}",
'"egal"',
'"bar", "bart", "ba"',
'"foo/ba"',
'"FO", "FO", &\[\], "FO"',
'"(BarFoO|BarFoOo|FoO|FoOo)"',
"\\|pn: &BStr\\| pn !=",
]
extend-ignore-identifiers-re = [
# Git commit hash
"[0-9a-f]{7,}",
"rela_[a-z_]+",
]

[default.extend-words]
rela = "rela"
unter = "unter"
[default.extend-identifiers]
_pn = "_pn"
ein = "ein"
6 changes: 3 additions & 3 deletions gitoxide-core/src/repository/clean.rs
Expand Up @@ -60,7 +60,7 @@ pub(crate) mod function {
let index = repo.index_or_empty()?;
let pathspec_for_dirwalk = !pathspec_matches_result;
let has_patterns = !patterns.is_empty();
let mut collect = InterruptableCollect::default();
let mut collect = InterruptibleCollect::default();
let collapse_directories = CollapseDirectory;
let options = repo
.dirwalk_options()?
Expand Down Expand Up @@ -365,11 +365,11 @@ pub(crate) mod function {
}

#[derive(Default)]
struct InterruptableCollect {
struct InterruptibleCollect {
inner: gix::dir::walk::delegate::Collect,
}

impl gix::dir::walk::Delegate for InterruptableCollect {
impl gix::dir::walk::Delegate for InterruptibleCollect {
fn emit(&mut self, entry: EntryRef<'_>, collapsed_directory_status: Option<Status>) -> walk::Action {
let res = self.inner.emit(entry, collapsed_directory_status);
if gix::interrupt::is_triggered() {
Expand Down
4 changes: 2 additions & 2 deletions gix-config/src/parse/nom/mod.rs
Expand Up @@ -190,10 +190,10 @@ fn subsection_unescaped<'i>(i: &mut &'i [u8]) -> PResult<&'i [u8], NomError<&'i
}

fn subsection_escaped_char<'i>(i: &mut &'i [u8]) -> PResult<&'i [u8], NomError<&'i [u8]>> {
preceded('\\', one_of(is_subsection_escapeable_char).recognize()).parse_next(i)
preceded('\\', one_of(is_subsection_escapable_char).recognize()).parse_next(i)
}

fn is_subsection_escapeable_char(c: u8) -> bool {
fn is_subsection_escapable_char(c: u8) -> bool {
c != b'\n'
}

Expand Down
4 changes: 2 additions & 2 deletions gix-diff/tests/rewrites/tracker.rs
Expand Up @@ -419,7 +419,7 @@ fn rename_by_similarity_reports_limit_if_encountered() -> crate::Result {
&mut track,
[
(Change::deletion(), "a", "first\nsecond\n"),
(Change::addition(), "b", "firt\nsecond\n"),
(Change::addition(), "b", "first\nsecond\n"),
(Change::addition(), "c", "second\nunrelated\n"),
],
);
Expand Down Expand Up @@ -464,7 +464,7 @@ fn rename_by_50_percent_similarity() -> crate::Result {
&mut track,
[
(Change::deletion(), "a", "first\nsecond\n"),
(Change::addition(), "b", "firt\nsecond\n"),
(Change::addition(), "b", "first\nsecond\n"),
(Change::addition(), "c", "second\nunrelated\n"),
],
);
Expand Down
2 changes: 1 addition & 1 deletion gix-dir/src/walk/classify.rs
Expand Up @@ -249,7 +249,7 @@ pub fn path(
return Ok(out.with_status(status).with_kind(kind, index_kind));
}

debug_assert!(maybe_status.is_none(), "It only communicates a single stae right now");
debug_assert!(maybe_status.is_none(), "It only communicates a single state right now");
if let Some(excluded) = ctx
.excludes
.as_mut()
Expand Down
4 changes: 2 additions & 2 deletions gix-dir/src/walk/mod.rs
Expand Up @@ -98,7 +98,7 @@ pub trait Delegate {
pub enum EmissionMode {
/// Emit each entry as it matches exactly, without doing any kind of simplification.
///
/// Emissions in this mode are happening as they occour, without any buffering or ordering.
/// Emissions in this mode are happening as they occur, without any buffering or ordering.
#[default]
Matching,
/// Emit only a containing directory if all of its entries are of the same type.
Expand Down Expand Up @@ -215,7 +215,7 @@ pub struct Context<'a> {
/// ### Important
///
/// The index must have been validated so that each entry that is considered up-to-date will have the [gix_index::entry::Flags::UPTODATE] flag
/// set. Otherwise the index entry is not considered and a disk-access may occour which is costly.
/// set. Otherwise the index entry is not considered and a disk-access may occur which is costly.
pub index: &'a gix_index::State,
/// A utility to lookup index entries faster, and deal with ignore-case handling.
///
Expand Down
2 changes: 1 addition & 1 deletion gix-dir/tests/walk/mod.rs
Expand Up @@ -1605,7 +1605,7 @@ fn expendable_and_precious_in_ignored_dir_with_pathspec() -> crate::Result {
"with pathspec, we match what's inside and expect to have all the lowest-level paths that have 'ignored' in them.\
It seems strange that 'precious' isn't precious, while 'all-precious' is. However, the ignore-search is special
as it goes backward through directories (using directory-declarations), and aborts if it matched. Thus it finds
that '$/all-precious/' matched, but in the other cases it maches 'ignored/'.
that '$/all-precious/' matched, but in the other cases it matches 'ignored/'.
'other' gets folded and inherits, just like before.
Also, look how the ignore-state overrides the prune-default for DotGit kinds, to have more finegrained classification."
);
Expand Down
2 changes: 1 addition & 1 deletion gix-filter/tests/eol/convert_to_worktree.rs
Expand Up @@ -59,7 +59,7 @@ fn no_conversion_if_nothing_to_do() -> crate::Result {
"mixed crlf and lf is avoided",
),
(
&b"elligible-but-disabled\nhere"[..],
&b"eligible-but-disabled\nhere"[..],
AttributesDigest::Binary,
"designated binary is never handled",
),
Expand Down
6 changes: 3 additions & 3 deletions gix-filter/tests/fixtures/baseline.sh
Expand Up @@ -17,7 +17,7 @@ function repo_assertions() {

git config filter.arrow.clean "$driver clean %f"
git config filter.arrow.smudge "$driver smudge %f"
git config filter.arrow.requred true
git config filter.arrow.required true

repo_assertions
)
Expand All @@ -26,7 +26,7 @@ function repo_assertions() {
git init process && cd process

git config filter.arrow.process "$driver process"
git config filter.arrow.requred true
git config filter.arrow.required true

repo_assertions
)
Expand All @@ -35,7 +35,7 @@ function repo_assertions() {
git init process-no-delay && cd process-no-delay

git config filter.arrow.process "$driver process disallow-delay"
git config filter.arrow.requred true
git config filter.arrow.required true

repo_assertions
)
2 changes: 1 addition & 1 deletion gix-fs/src/lib.rs
Expand Up @@ -8,7 +8,7 @@ use std::path::PathBuf;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
pub struct Capabilities {
/// If `true`, the filesystem will consider the precomposed umlaut `ä` similiar to its decomposed form `"a\u{308}"` and consider them the same.
/// If `true`, the filesystem will consider the precomposed umlaut `ä` similar to its decomposed form `"a\u{308}"` and consider them the same.
/// If `false`, the filesystem will only see bytes which means that the above example could live side-by-side.
///
/// Even though a filesystem that treats both forms the same will still reproduce the exact same byte sequence during traversal for instance,
Expand Down
2 changes: 1 addition & 1 deletion gix-pathspec/src/search/matching.rs
Expand Up @@ -20,7 +20,7 @@ impl Search {
///
/// ### Deviation
///
/// The case-sensivity of the attribute match is controlled by the sensitivity of the pathspec, instead of being based on the
/// The case-sensitivity of the attribute match is controlled by the sensitivity of the pathspec, instead of being based on the
/// case folding settings of the repository. That way we assure that the matching is consistent.
/// Higher-level crates should control this default case folding of pathspecs when instantiating them, which is when they can
/// set it to match the repository setting for more natural behaviour when, for instance, adding files to a repository:
Expand Down
2 changes: 1 addition & 1 deletion gix-pathspec/tests/search/mod.rs
Expand Up @@ -417,7 +417,7 @@ fn init_with_exclude() -> crate::Result {
assert_eq!(search.patterns().count(), 2, "nothing artificial is added");
assert!(
search.patterns().next().expect("first of two").is_excluded(),
"re-orded so that excluded are first"
"re-ordered so that excluded are first"
);
assert_eq!(search.common_prefix(), "tests");
assert_eq!(
Expand Down
2 changes: 1 addition & 1 deletion gix-status/src/index_as_worktree/types.rs
Expand Up @@ -38,7 +38,7 @@ pub struct Options {
pub struct Context<'a> {
/// The pathspec to limit the amount of paths that are checked. Can be empty to allow all paths.
///
/// Note that these are expected to have a [commont_prefix()](gix_pathspec::Search::common_prefix()) according
/// Note that these are expected to have a [common_prefix()](gix_pathspec::Search::common_prefix()) according
/// to the prefix of the repository to efficiently limit the scope of the paths we process.
pub pathspec: gix_pathspec::Search,
/// A stack pre-configured to allow accessing attributes for each entry, as required for `filter`
Expand Down
4 changes: 2 additions & 2 deletions gix-status/src/index_as_worktree_with_renames/types.rs
Expand Up @@ -306,15 +306,15 @@ pub struct Options {
/// the latency until the first entries are received. Note that some entries are never candidates for renames, which means
/// they are forwarded to the caller right away.
///
/// If `None`, no tracking will occour, which means that all output becomes visible to the delegate immediately.
/// If `None`, no tracking will occur, which means that all output becomes visible to the delegate immediately.
pub rewrites: Option<gix_diff::Rewrites>,
}

/// The context for [index_as_worktree_with_renames()`](crate::index_as_worktree_with_renames()).
pub struct Context<'a> {
/// The pathspec to limit the amount of paths that are checked. Can be empty to allow all paths.
///
/// Note that these are expected to have a [commont_prefix()](gix_pathspec::Search::common_prefix()) according
/// Note that these are expected to have a [common_prefix()](gix_pathspec::Search::common_prefix()) according
/// to the prefix of the repository to efficiently limit the scope of the paths we process, both for the
/// index modifications as well as for the directory walk.
pub pathspec: gix_pathspec::Search,
Expand Down
4 changes: 2 additions & 2 deletions gix-trace/tests/trace.rs
Expand Up @@ -2,8 +2,8 @@ use gix_trace::{coarse, debug, detail, error, event, info, span, trace, warn};
#[test]
fn span() {
let _x = span!(gix_trace::Level::Coarse, "hello");
let fourty_two = span!(gix_trace::Level::Coarse, "hello", x = "value", y = 42).into_scope(|| 42);
assert_eq!(fourty_two, 42);
let forty_two = span!(gix_trace::Level::Coarse, "hello", x = "value", y = 42).into_scope(|| 42);
assert_eq!(forty_two, 42);
let span = span!(target: "other", gix_trace::Level::Coarse, "hello", x = "value", y = 42);
span.record("y", "hello").record("x", 36);
}
Expand Down
2 changes: 1 addition & 1 deletion gix-transport/Cargo.toml
Expand Up @@ -30,7 +30,7 @@ http-client = [
]
## Implies `http-client`, and adds support for the http and https transports using the Rust bindings for `libcurl`.
http-client-curl = ["curl", "http-client"]
## Implies `http-client-curl` and enables `rustls` for creationg `https://` connections.
## Implies `http-client-curl` and enables `rustls` for creating `https://` connections.
http-client-curl-rust-tls = ["http-client-curl", "curl/rustls"]
### Implies `http-client` and adds support for http and https transports using the blocking version of `reqwest`.
http-client-reqwest = ["reqwest", "http-client"]
Expand Down
4 changes: 2 additions & 2 deletions gix-traverse/src/commit/simple.rs
Expand Up @@ -167,7 +167,7 @@ mod init {
}
}

/// Lifecyle
/// Lifecycle
impl<Find> Simple<Find, fn(&oid) -> bool>
where
Find: gix_object::Find,
Expand All @@ -185,7 +185,7 @@ mod init {
}
}

/// Lifecyle
/// Lifecycle
impl<Find, Predicate> Simple<Find, Predicate>
where
Find: gix_object::Find,
Expand Down
6 changes: 3 additions & 3 deletions gix-utils/src/btoi.rs
Expand Up @@ -195,9 +195,9 @@ pub fn to_signed<I: MinNumTraits>(bytes: &[u8]) -> Result<I, ParseIntegerError>
/// Returns [`ParseIntegerError`] for any of the following conditions:
///
/// * `bytes` has no digits
/// * not all characters of `bytes` are `0-9`, `a-z`, `A-Z`, exluding an
/// * not all characters of `bytes` are `0-9`, `a-z`, `A-Z`, excluding an
/// optional leading sign
/// * not all characters refer to digits in the given `radix`, exluding an
/// * not all characters refer to digits in the given `radix`, excluding an
/// optional leading sign
/// * the number overflows or underflows `I`
///
Expand Down Expand Up @@ -272,7 +272,7 @@ pub fn to_signed_with_radix<I: MinNumTraits>(bytes: &[u8], radix: u32) -> Result
pub trait MinNumTraits: Sized + Copy + TryFrom<u32> {
/// the 0 value for this type
const ZERO: Self;
/// convert from a unsinged 32-bit word
/// convert from a unsigned 32-bit word
fn from_u32(n: u32) -> Option<Self> {
Self::try_from(n).ok()
}
Expand Down
2 changes: 1 addition & 1 deletion gix/src/status/index_worktree.rs
Expand Up @@ -279,7 +279,7 @@ mod submodule_status {
/// ### Parallel Operation
///
/// Note that without the `parallel` feature, the iterator becomes 'serial', which means all status will be computed in advance
/// and it's non-interruptable, yielding worse performance for is-dirty checks for instance as interruptions won't happen.
/// and it's non-interruptible, yielding worse performance for is-dirty checks for instance as interruptions won't happen.
/// It's a crutch that is just there to make single-threaded applications possible at all, as it's not really an iterator
/// anymore. If this matters, better run [Repository::index_worktree_status()] by hand as it provides all control one would need,
/// just not as an iterator.
Expand Down
4 changes: 2 additions & 2 deletions gix/src/submodule/mod.rs
Expand Up @@ -385,15 +385,15 @@ pub mod status {
if !state.worktree_checkout {
return Ok(status);
}
let statusses = adjust_options(sm_repo.status(gix_features::progress::Discard)?)
let statuses = adjust_options(sm_repo.status(gix_features::progress::Discard)?)
.index_worktree_options_mut(|opts| {
if ignore == config::Ignore::Untracked {
opts.dirwalk_options = None;
}
})
.into_index_worktree_iter(Vec::new())?;
let mut changes = Vec::new();
for change in statusses {
for change in statuses {
changes.push(change?);
}
status.changes = Some(changes);
Expand Down
2 changes: 1 addition & 1 deletion gix/tests/fixtures/make_remote_repos.sh
Expand Up @@ -22,7 +22,7 @@ GIT_COMMITTER_EMAIL=committer@example.com
GIT_COMMITTER_NAME='C O Mitter'
GIT_COMMITTER_DATE='1112354055 +0200'

# runup to the correct count for ambigous commits
# runup to the correct count for ambiguous commits
tick; tick; tick; tick; tick

git init base
Expand Down
2 changes: 1 addition & 1 deletion gix/tests/status/mod.rs
Expand Up @@ -144,7 +144,7 @@ mod is_dirty {
#[test]
fn submodule_changes_are_picked_up() -> crate::Result {
let repo = submodule_repo("submodule-head-changed")?;
assert!(repo.is_dirty()?, "head-changes are also discoverd");
assert!(repo.is_dirty()?, "head-changes are also discovered");
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion src/plumbing/progress.rs
Expand Up @@ -263,7 +263,7 @@ static GIT_CONFIG: &[Record] = &[
},
Record {
config: "fetch.showForcedUpdates",
usage: NotApplicable("we don't support advices")
usage: NotApplicable("we don't support advice")
},
Record {
config: "fetch.output",
Expand Down

0 comments on commit f72ecce

Please sign in to comment.