1
1
mirror of https://github.com/Byron/gitoxide synced 2025-10-06 01:52:40 +02:00

Fix typos

This commit is contained in:
Viktor Szépe
2024-04-10 16:09:07 +00:00
parent b7ab287f03
commit f72ecce45b
27 changed files with 63 additions and 50 deletions

View File

@@ -8,6 +8,6 @@ maintainers:
- push directly to 'main' branch - push directly to 'main' branch
- reviews or suggestions by other maintainers if PRs are used - reviews or suggestions by other maintainers if PRs are used
- co-ownership of contributed crates - co-ownership of contributed crates
- reveive sponsorship via GitHub from project page - receive sponsorship via GitHub from project page

View File

@@ -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 ## 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`. ## 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. ## 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. ## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports.

View File

@@ -1,19 +1,32 @@
[default]
extend-ignore-identifiers-re = [
"[a-f0-9]{7,}",
"[Ff][Oo][Oo]",
"[a-zA-Z0-9]{20,}",
]
[files] [files]
extend-exclude = [ extend-exclude = [
"**/CHANGELOG.md", "**/CHANGELOG.md",
"**/tests/fixtures/**", "*.response",
"etc/corpus/repo_metadata.sample.jsonl",
"gix-config/benches/large_config_file.rs", "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-identifiers]
[default.extend-words] _pn = "_pn"
rela = "rela" ein = "ein"
unter = "unter"

View File

@@ -60,7 +60,7 @@ pub(crate) mod function {
let index = repo.index_or_empty()?; let index = repo.index_or_empty()?;
let pathspec_for_dirwalk = !pathspec_matches_result; let pathspec_for_dirwalk = !pathspec_matches_result;
let has_patterns = !patterns.is_empty(); let has_patterns = !patterns.is_empty();
let mut collect = InterruptableCollect::default(); let mut collect = InterruptibleCollect::default();
let collapse_directories = CollapseDirectory; let collapse_directories = CollapseDirectory;
let options = repo let options = repo
.dirwalk_options()? .dirwalk_options()?
@@ -365,11 +365,11 @@ pub(crate) mod function {
} }
#[derive(Default)] #[derive(Default)]
struct InterruptableCollect { struct InterruptibleCollect {
inner: gix::dir::walk::delegate::Collect, 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 { fn emit(&mut self, entry: EntryRef<'_>, collapsed_directory_status: Option<Status>) -> walk::Action {
let res = self.inner.emit(entry, collapsed_directory_status); let res = self.inner.emit(entry, collapsed_directory_status);
if gix::interrupt::is_triggered() { if gix::interrupt::is_triggered() {

View File

@@ -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]>> { 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' c != b'\n'
} }

View File

@@ -419,7 +419,7 @@ fn rename_by_similarity_reports_limit_if_encountered() -> crate::Result {
&mut track, &mut track,
[ [
(Change::deletion(), "a", "first\nsecond\n"), (Change::deletion(), "a", "first\nsecond\n"),
(Change::addition(), "b", "firt\nsecond\n"), (Change::addition(), "b", "first\nsecond\n"),
(Change::addition(), "c", "second\nunrelated\n"), (Change::addition(), "c", "second\nunrelated\n"),
], ],
); );
@@ -464,7 +464,7 @@ fn rename_by_50_percent_similarity() -> crate::Result {
&mut track, &mut track,
[ [
(Change::deletion(), "a", "first\nsecond\n"), (Change::deletion(), "a", "first\nsecond\n"),
(Change::addition(), "b", "firt\nsecond\n"), (Change::addition(), "b", "first\nsecond\n"),
(Change::addition(), "c", "second\nunrelated\n"), (Change::addition(), "c", "second\nunrelated\n"),
], ],
); );

View File

@@ -249,7 +249,7 @@ pub fn path(
return Ok(out.with_status(status).with_kind(kind, index_kind)); 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 if let Some(excluded) = ctx
.excludes .excludes
.as_mut() .as_mut()

View File

@@ -98,7 +98,7 @@ pub trait Delegate {
pub enum EmissionMode { pub enum EmissionMode {
/// Emit each entry as it matches exactly, without doing any kind of simplification. /// 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] #[default]
Matching, Matching,
/// Emit only a containing directory if all of its entries are of the same type. /// Emit only a containing directory if all of its entries are of the same type.
@@ -215,7 +215,7 @@ pub struct Context<'a> {
/// ### Important /// ### 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 /// 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, pub index: &'a gix_index::State,
/// A utility to lookup index entries faster, and deal with ignore-case handling. /// A utility to lookup index entries faster, and deal with ignore-case handling.
/// ///

View File

@@ -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.\ "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 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 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. '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." Also, look how the ignore-state overrides the prune-default for DotGit kinds, to have more finegrained classification."
); );

View File

@@ -59,7 +59,7 @@ fn no_conversion_if_nothing_to_do() -> crate::Result {
"mixed crlf and lf is avoided", "mixed crlf and lf is avoided",
), ),
( (
&b"elligible-but-disabled\nhere"[..], &b"eligible-but-disabled\nhere"[..],
AttributesDigest::Binary, AttributesDigest::Binary,
"designated binary is never handled", "designated binary is never handled",
), ),

View File

@@ -17,7 +17,7 @@ function repo_assertions() {
git config filter.arrow.clean "$driver clean %f" git config filter.arrow.clean "$driver clean %f"
git config filter.arrow.smudge "$driver smudge %f" git config filter.arrow.smudge "$driver smudge %f"
git config filter.arrow.requred true git config filter.arrow.required true
repo_assertions repo_assertions
) )
@@ -26,7 +26,7 @@ function repo_assertions() {
git init process && cd process git init process && cd process
git config filter.arrow.process "$driver process" git config filter.arrow.process "$driver process"
git config filter.arrow.requred true git config filter.arrow.required true
repo_assertions repo_assertions
) )
@@ -35,7 +35,7 @@ function repo_assertions() {
git init process-no-delay && cd process-no-delay git init process-no-delay && cd process-no-delay
git config filter.arrow.process "$driver process disallow-delay" git config filter.arrow.process "$driver process disallow-delay"
git config filter.arrow.requred true git config filter.arrow.required true
repo_assertions repo_assertions
) )

View File

@@ -8,7 +8,7 @@ use std::path::PathBuf;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)] #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
pub struct Capabilities { 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. /// 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, /// Even though a filesystem that treats both forms the same will still reproduce the exact same byte sequence during traversal for instance,

View File

@@ -20,7 +20,7 @@ impl Search {
/// ///
/// ### Deviation /// ### 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. /// 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 /// 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: /// set it to match the repository setting for more natural behaviour when, for instance, adding files to a repository:

View File

@@ -417,7 +417,7 @@ fn init_with_exclude() -> crate::Result {
assert_eq!(search.patterns().count(), 2, "nothing artificial is added"); assert_eq!(search.patterns().count(), 2, "nothing artificial is added");
assert!( assert!(
search.patterns().next().expect("first of two").is_excluded(), 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!(search.common_prefix(), "tests");
assert_eq!( assert_eq!(

View File

@@ -38,7 +38,7 @@ pub struct Options {
pub struct Context<'a> { pub struct Context<'a> {
/// The pathspec to limit the amount of paths that are checked. Can be empty to allow all paths. /// 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. /// to the prefix of the repository to efficiently limit the scope of the paths we process.
pub pathspec: gix_pathspec::Search, pub pathspec: gix_pathspec::Search,
/// A stack pre-configured to allow accessing attributes for each entry, as required for `filter` /// A stack pre-configured to allow accessing attributes for each entry, as required for `filter`

View File

@@ -306,7 +306,7 @@ pub struct Options {
/// the latency until the first entries are received. Note that some entries are never candidates for renames, which means /// 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. /// 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>, pub rewrites: Option<gix_diff::Rewrites>,
} }
@@ -314,7 +314,7 @@ pub struct Options {
pub struct Context<'a> { pub struct Context<'a> {
/// The pathspec to limit the amount of paths that are checked. Can be empty to allow all paths. /// 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 /// 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. /// index modifications as well as for the directory walk.
pub pathspec: gix_pathspec::Search, pub pathspec: gix_pathspec::Search,

View File

@@ -2,8 +2,8 @@ use gix_trace::{coarse, debug, detail, error, event, info, span, trace, warn};
#[test] #[test]
fn span() { fn span() {
let _x = span!(gix_trace::Level::Coarse, "hello"); let _x = span!(gix_trace::Level::Coarse, "hello");
let fourty_two = span!(gix_trace::Level::Coarse, "hello", x = "value", y = 42).into_scope(|| 42); let forty_two = span!(gix_trace::Level::Coarse, "hello", x = "value", y = 42).into_scope(|| 42);
assert_eq!(fourty_two, 42); assert_eq!(forty_two, 42);
let span = span!(target: "other", gix_trace::Level::Coarse, "hello", x = "value", y = 42); let span = span!(target: "other", gix_trace::Level::Coarse, "hello", x = "value", y = 42);
span.record("y", "hello").record("x", 36); span.record("y", "hello").record("x", 36);
} }

View File

@@ -30,7 +30,7 @@ http-client = [
] ]
## Implies `http-client`, and adds support for the http and https transports using the Rust bindings for `libcurl`. ## Implies `http-client`, and adds support for the http and https transports using the Rust bindings for `libcurl`.
http-client-curl = ["curl", "http-client"] 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"] 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`. ### Implies `http-client` and adds support for http and https transports using the blocking version of `reqwest`.
http-client-reqwest = ["reqwest", "http-client"] http-client-reqwest = ["reqwest", "http-client"]

View File

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

View File

@@ -195,9 +195,9 @@ pub fn to_signed<I: MinNumTraits>(bytes: &[u8]) -> Result<I, ParseIntegerError>
/// Returns [`ParseIntegerError`] for any of the following conditions: /// Returns [`ParseIntegerError`] for any of the following conditions:
/// ///
/// * `bytes` has no digits /// * `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 /// 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 /// optional leading sign
/// * the number overflows or underflows `I` /// * the number overflows or underflows `I`
/// ///
@@ -272,7 +272,7 @@ pub fn to_signed_with_radix<I: MinNumTraits>(bytes: &[u8], radix: u32) -> Result
pub trait MinNumTraits: Sized + Copy + TryFrom<u32> { pub trait MinNumTraits: Sized + Copy + TryFrom<u32> {
/// the 0 value for this type /// the 0 value for this type
const ZERO: Self; const ZERO: Self;
/// convert from a unsinged 32-bit word /// convert from a unsigned 32-bit word
fn from_u32(n: u32) -> Option<Self> { fn from_u32(n: u32) -> Option<Self> {
Self::try_from(n).ok() Self::try_from(n).ok()
} }

View File

@@ -279,7 +279,7 @@ mod submodule_status {
/// ### Parallel Operation /// ### Parallel Operation
/// ///
/// Note that without the `parallel` feature, the iterator becomes 'serial', which means all status will be computed in advance /// 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 /// 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, /// 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. /// just not as an iterator.

View File

@@ -385,7 +385,7 @@ pub mod status {
if !state.worktree_checkout { if !state.worktree_checkout {
return Ok(status); 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| { .index_worktree_options_mut(|opts| {
if ignore == config::Ignore::Untracked { if ignore == config::Ignore::Untracked {
opts.dirwalk_options = None; opts.dirwalk_options = None;
@@ -393,7 +393,7 @@ pub mod status {
}) })
.into_index_worktree_iter(Vec::new())?; .into_index_worktree_iter(Vec::new())?;
let mut changes = Vec::new(); let mut changes = Vec::new();
for change in statusses { for change in statuses {
changes.push(change?); changes.push(change?);
} }
status.changes = Some(changes); status.changes = Some(changes);

View File

@@ -22,7 +22,7 @@ GIT_COMMITTER_EMAIL=committer@example.com
GIT_COMMITTER_NAME='C O Mitter' GIT_COMMITTER_NAME='C O Mitter'
GIT_COMMITTER_DATE='1112354055 +0200' 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 tick; tick; tick; tick; tick
git init base git init base

View File

@@ -144,7 +144,7 @@ mod is_dirty {
#[test] #[test]
fn submodule_changes_are_picked_up() -> crate::Result { fn submodule_changes_are_picked_up() -> crate::Result {
let repo = submodule_repo("submodule-head-changed")?; 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(()) Ok(())
} }

View File

@@ -263,7 +263,7 @@ static GIT_CONFIG: &[Record] = &[
}, },
Record { Record {
config: "fetch.showForcedUpdates", config: "fetch.showForcedUpdates",
usage: NotApplicable("we don't support advices") usage: NotApplicable("we don't support advice")
}, },
Record { Record {
config: "fetch.output", config: "fetch.output",