Skip to content

Commit d5ac6b3

Browse files
committed
I can spell
1 parent d644db3 commit d5ac6b3

File tree

10 files changed

+23
-25
lines changed

10 files changed

+23
-25
lines changed

crates/but-rebase/src/graph_rebase/cherry_pick.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub enum CherryPickOutcome {
3838
/// - Then, I do the three way merge where N is the "base", M is "ours", and X
3939
/// is "theirs".
4040
///
41-
/// Expect in the case where X is conflicted. In that case we then make use of
41+
/// Except in the case where X is conflicted. In that case we then make use of
4242
/// X's "base" sub-tree as the base.
4343
pub fn cherry_pick(
4444
repo: &gix::Repository,
@@ -64,7 +64,7 @@ pub fn cherry_pick(
6464
Ok(CherryPickOutcome::Identity(target.id.detach()))
6565
}
6666
(MergeOutcome::Conflict, _) | (_, MergeOutcome::Conflict) => {
67-
// TODO(cto): We can hande the specific case where (the base is
67+
// TODO(cto): We can handle the specific case where (the base is
6868
// _not_ conflicted & the ontos _is_ conflicted & the target == base
6969
// & ontos.len() == 2) by writing out the ontos conflict as a
7070
// conflicted merge commit, without expanding our conflict

crates/but-rebase/src/graph_rebase/commit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Provides some slightly higher level tools to help with manipulating commits, in preperation for use in the editor.
1+
//! Provides some slightly higher level tools to help with manipulating commits, in preparation for use in the editor.
22
33
use anyhow::Result;
44
use gix::prelude::ObjectIdExt;
@@ -14,7 +14,7 @@ impl Editor {
1414
but_core::Commit::from_id(id.attach(&self.repo))
1515
}
1616

17-
/// Writes a commit with correct signing to the in memory repostiory.
17+
/// Writes a commit with correct signing to the in memory repository.
1818
pub fn write_commit(
1919
&self,
2020
commit: but_core::Commit<'_>,

crates/but-rebase/src/graph_rebase/creation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl GraphExt for Graph {
1919
// TODO(CTO): Look into stopping at the common base
2020
let entrypoint = self.lookup_entrypoint()?;
2121

22-
// Commits in this list are ordred such that iterating in reverse will
22+
// Commits in this list are ordered such that iterating in reverse will
2323
// have any relevant parent commits already inserted in the graph.
2424
let mut commits: Vec<Commit> = Vec::new();
2525
// References are ordered from child-most to parent-most

crates/but-rebase/src/graph_rebase/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub enum Step {
2929
/// If this is Some, the commit WILL NOT be picked onto the parents the
3030
/// graph implies but instead on to the parents listed here.
3131
///
32-
/// This is intened to be a private API
32+
/// This is intended to be a private API
3333
preserved_parents: Option<Vec<gix::ObjectId>>,
3434
},
3535
/// Represents applying a reference to the commit found at it's first parent
@@ -58,8 +58,6 @@ pub(crate) struct Edge {
5858
///
5959
/// A child commit should have edges that all have unique orders. In order
6060
/// to achive that we can employ the following semantics.
61-
///
62-
/// When replacing a given parent with N other parents, the first in that list takes the old parent's order, and the rest take the
6361
order: usize,
6462
}
6563

crates/but-rebase/src/graph_rebase/mutate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Operations for mutation the editor
1+
//! Operations for mutating the editor
22
33
use anyhow::{Result, anyhow};
44
use petgraph::{Direction, visit::EdgeRef};

crates/but-rebase/src/graph_rebase/rebase.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ pub struct SuccessfulRebase {
2020
pub(crate) repo: gix::Repository,
2121
/// A mapping of any commits that were rewritten as part of the rebase
2222
pub(crate) commit_mapping: HashMap<gix::ObjectId, gix::ObjectId>,
23-
/// A mapping between the origional step graph and the new one
23+
/// A mapping between the original step graph and the new one
2424
pub(crate) graph_mapping: HashMap<StepGraphIndex, StepGraphIndex>,
25-
/// Any reference edits that need to be commited as a result of the history
25+
/// Any reference edits that need to be committed as a result of the history
2626
/// rewrite
2727
pub(crate) ref_edits: Vec<RefEdit>,
2828
/// The new step graph
@@ -49,7 +49,7 @@ impl Editor {
4949
.collect::<Vec<_>>(),
5050
);
5151

52-
// A 1 to 1 mapping between the incoming graph and hte output graph
52+
// A 1 to 1 mapping between the incoming graph and the output graph
5353
let mut graph_mapping: HashMap<StepGraphIndex, StepGraphIndex> = HashMap::new();
5454
// The step graph with updated commit oids
5555
let mut output_graph = StepGraph::new();
@@ -174,7 +174,7 @@ impl Editor {
174174

175175
for e in edges {
176176
let Some(new_parent) = graph_mapping.get(&e.target()) else {
177-
bail!("Failed to find cooresponding parent");
177+
bail!("Failed to find corresponding parent");
178178
};
179179

180180
output_graph.add_edge(new_idx, *new_parent, e.weight().clone());
@@ -233,7 +233,7 @@ fn collect_ordered_parents(graph: &StepGraph, target: StepGraphIndex) -> Vec<Ste
233233
while let Some(candidate) = potential_parent_edges.pop() {
234234
if let Step::Pick { .. } = graph[candidate.target()] {
235235
parents.push(candidate.target());
236-
// Don't persue the children
236+
// Don't pursue the children
237237
continue;
238238
};
239239

@@ -370,7 +370,7 @@ mod test {
370370
}
371371

372372
#[test]
373-
fn insertion_order_is_irrelivant() -> Result<()> {
373+
fn insertion_order_is_irrelevant() -> Result<()> {
374374
let mut graph = StepGraph::new();
375375
let a_id = gix::ObjectId::from_str("1000000000000000000000000000000000000000")?;
376376
let a = graph.add_node(Step::Pick {

crates/but-rebase/tests/rebase/graph_rebase/cherry_pick.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ fn no_parents_to_single_parent_cp_conflicts() -> Result<()> {
569569
}
570570

571571
#[test]
572-
fn cherry_pick_back_to_origional_parents_unconflicts() -> Result<()> {
572+
fn cherry_pick_back_to_original_parents_unconflicts() -> Result<()> {
573573
set_var("GITBUTLER_CHANGE_ID", "1");
574574
let (repo, _tmpdir, _meta) = fixture_writable("cherry-pick-scenario")?;
575575

crates/but-rebase/tests/rebase/graph_rebase/insert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,5 @@ fn insert_above_commit_with_two_children() -> Result<()> {
138138
#[test]
139139
#[ignore]
140140
fn inserts_violating_fp_protection_should_cause_rebase_failure() -> Result<()> {
141-
panic!("Branch protection hasn't been implemented dyet");
141+
panic!("Branch protection hasn't been implemented yet");
142142
}

crates/but-rebase/tests/rebase/graph_rebase/replace.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn reword_a_commit() -> Result<()> {
3232

3333
let mut editor = graph.to_editor(&repo)?;
3434

35-
// get the origional a
35+
// get the original a
3636
let a = repo.rev_parse_single("A")?.detach();
3737

3838
// reword commit a
@@ -41,7 +41,7 @@ fn reword_a_commit() -> Result<()> {
4141
a_obj.message = "A: a second coming".into();
4242
let a_new = repo.write_object(a_obj)?.detach();
4343

44-
// select the origional a out of the graph
44+
// select the original a out of the graph
4545
let a_selector = editor
4646
.select_commit(a)
4747
.context("Failed to find commit a in editor graph")?;
@@ -75,7 +75,7 @@ fn reword_a_commit() -> Result<()> {
7575
}
7676

7777
#[test]
78-
fn ammend_a_commit() -> Result<()> {
78+
fn amend_a_commit() -> Result<()> {
7979
set_var("GITBUTLER_CHANGE_ID", "1");
8080
let (repo, _tmpdir, meta) = fixture_writable("merge-in-the-middle")?;
8181

@@ -103,7 +103,7 @@ fn ammend_a_commit() -> Result<()> {
103103

104104
let mut editor = graph.to_editor(&repo)?;
105105

106-
// get the origional a
106+
// get the original a
107107
let a = repo.rev_parse_single("A")?;
108108
insta::assert_snapshot!(visualize_tree(a), @r#"
109109
0cc630c
@@ -122,7 +122,7 @@ fn ammend_a_commit() -> Result<()> {
122122
a_obj.message = "A: a second coming".into();
123123
let a_new = repo.write_object(a_obj.inner)?.detach();
124124

125-
// select the origional a out of the graph
125+
// select the original a out of the graph
126126
let a_selector = editor
127127
.select_commit(a.detach())
128128
.context("Failed to find commit a in editor graph")?;
@@ -174,5 +174,5 @@ fn ammend_a_commit() -> Result<()> {
174174
#[test]
175175
#[ignore]
176176
fn replaces_violating_fp_protection_should_cause_rebase_failure() -> Result<()> {
177-
panic!("Branch protection hasn't been implemented dyet");
177+
panic!("Branch protection hasn't been implemented yet");
178178
}

crates/but-worktrees/tests/worktree/integrate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn test_create_unrelated_change_and_reintroduce() -> anyhow::Result<()> {
3838
commits_above_conflict: false,
3939
working_dir_conflicts: false
4040
},
41-
"We should be able to integrate the unrelated change back into the origional reference"
41+
"We should be able to integrate the unrelated change back into the original reference"
4242
);
4343
assert_eq!(
4444
worktree_integration_status(
@@ -273,7 +273,7 @@ fn test_causes_workdir_conflicts_complex() -> anyhow::Result<()> {
273273
commits_above_conflict: false,
274274
working_dir_conflicts: false
275275
},
276-
"When integrating into feature-b, because the thing that commits is the cherry on top of the source, it auto-resolves to what was origionally there, resulting in the working_dir not conflicting"
276+
"When integrating into feature-b, because the thing that commits is the cherry on top of the source, it auto-resolves to what was originally there, resulting in the working_dir not conflicting"
277277
);
278278

279279
assert!(

0 commit comments

Comments
 (0)