Skip to content

Commit 3280daa

Browse files
committed
refactor
- cargo fmt
1 parent 40c3ef6 commit 3280daa

File tree

23 files changed

+77
-76
lines changed

23 files changed

+77
-76
lines changed

apps/desktop/src/components/UnifiedDiffView.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
const projectState = $derived(uiState.project(projectId));
6868
const exclusiveAction = $derived(projectState.exclusiveAction.current);
6969
70-
const isCommiting = $derived(
70+
const isCommitting = $derived(
7171
exclusiveAction?.type === 'commit' && selectionId.type === 'worktree'
7272
);
7373
@@ -214,7 +214,7 @@
214214
>
215215
<HunkDiff
216216
draggingDisabled={!draggable}
217-
hideCheckboxes={!isCommiting}
217+
hideCheckboxes={!isCommitting}
218218
filePath={change.path}
219219
hunkStr={hunk.diff}
220220
staged={selection.current.selected}

apps/desktop/src/lib/actions/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export type Trigger =
137137
export type Status =
138138
| { readonly type: 'completed' }
139139
| { readonly type: 'failed'; readonly subject: string }
140-
| { readonly type: 'interupted'; readonly subject: string };
140+
| { readonly type: 'interrupted'; readonly subject: string };
141141

142142
/** Represents a workflow that was executed by GitButler. */
143143
export class Workflow {

apps/desktop/src/lib/updater/updater.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const UPDATE_INTERVAL_MS = 3600000; // Hourly
4242
* Note that the Tauri API `checkUpdate` hangs indefinitely in dev mode, build
4343
* a nightly if you want to test the updater manually.
4444
*
45-
* export TAURI_SIGNING_PRIVATE_KEY=does not
45+
* export TAURI_SIGNING_PRIVATE_KEY=doesnot
4646
* export TAURI_SIGNING_PRIVATE_KEY_PASSWORD=matter
4747
* ./scripts/release.sh --channel nightly --version "0.5.678"
4848
*/

apps/web/src/lib/components/service/FullscreenIllustrationCard.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import walkingSvg from '$lib/assets/splash-illustrations/walking.svg?raw';
2+
import walkingSvg from '$lib/assets/splash-illustrations/walkin.svg?raw';
33
import type { Snippet } from 'svelte';
44
55
interface Props {

crates/but-api/src/legacy/repo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ async fn handle_git_prompt_clone(prompt: String, url: String) -> Option<String>
6060

6161
#[but_api]
6262
#[instrument(err(Debug))]
63-
pub fn get_uncommited_files(project_id: ProjectId) -> Result<Vec<RemoteBranchFile>> {
63+
pub fn get_uncommitted_files(project_id: ProjectId) -> Result<Vec<RemoteBranchFile>> {
6464
let ctx = Context::new_from_legacy_project_id(project_id)?;
65-
gitbutler_branch_actions::get_uncommited_files(&ctx)
65+
gitbutler_branch_actions::get_uncommitted_files(&ctx)
6666
}
6767

6868
#[but_api]

crates/but-cherry-apply/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use but_rebase::Rebase;
3434
use but_workspace::legacy::{StacksFilter, stack_ext::StackExt, stacks_v3};
3535
use gitbutler_branch_actions::update_workspace_commit;
3636
use gitbutler_stack::VirtualBranchesHandle;
37-
use gitbutler_workspace::branch_trees::{WorkspaceState, update_uncommited_changes};
37+
use gitbutler_workspace::branch_trees::{WorkspaceState, update_uncommitted_changes};
3838
use gix::{ObjectId, Repository};
3939
use serde::Serialize;
4040

@@ -139,7 +139,7 @@ pub fn cherry_apply(
139139

140140
{
141141
let new_workspace = WorkspaceState::create(ctx, perm.read_permission())?;
142-
update_uncommited_changes(ctx, old_workspace, new_workspace, perm)?;
142+
update_uncommitted_changes(ctx, old_workspace, new_workspace, perm)?;
143143
}
144144

145145
update_workspace_commit(&vb_state, ctx, false)?;

crates/but-core/src/tree/tests.rs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod to_additive_hunks {
33

44
#[test]
55
fn rejected() {
6-
let with = vec![hunk_header("-1,10", "+1,10")];
6+
let wth = vec![hunk_header("-1,10", "+1,10")];
77
insta::assert_debug_snapshot!(to_additive_hunks(
88
[
99
// rejected as old is out of bounds
@@ -13,8 +13,8 @@ mod to_additive_hunks {
1313
// rejected as it doesn't match any anchor point, nor does it match hunks without context
1414
hunk_header("-0,0", "+2,10")
1515
],
16-
&with,
17-
&with,
16+
&wth,
17+
&wth,
1818
).unwrap(), @r#"
1919
(
2020
[],
@@ -29,15 +29,15 @@ mod to_additive_hunks {
2929

3030
#[test]
3131
fn only_selections() {
32-
let with = vec![hunk_header("-1,10", "+1,10")];
32+
let wth = vec![hunk_header("-1,10", "+1,10")];
3333
insta::assert_debug_snapshot!(to_additive_hunks(
3434
[
3535
hunk_header("-1,1", "+0,0"),
3636
hunk_header("-5,2", "+0,0"),
3737
hunk_header("-10,1", "+0,0")
3838
],
39-
&with,
40-
&with,
39+
&wth,
40+
&wth,
4141
).unwrap(), @r#"
4242
(
4343
[
@@ -54,8 +54,8 @@ mod to_additive_hunks {
5454
hunk_header("-0,0", "+5,2"),
5555
hunk_header("-0,0", "+10,1")
5656
],
57-
&with,
58-
&with,
57+
&wth,
58+
&wth,
5959
).unwrap(), @r#"
6060
(
6161
[
@@ -72,8 +72,8 @@ mod to_additive_hunks {
7272
hunk_header("-5,2", "+0,0"),
7373
hunk_header("-0,0", "+10,1")
7474
],
75-
&with,
76-
&with,
75+
&wth,
76+
&wth,
7777
).unwrap(), @r#"
7878
(
7979
[
@@ -90,8 +90,8 @@ mod to_additive_hunks {
9090
hunk_header("-0,0", "+5,2"),
9191
hunk_header("-10,1", "+0,0")
9292
],
93-
&with,
94-
&with,
93+
&wth,
94+
&wth,
9595
).unwrap(), @r#"
9696
(
9797
[
@@ -106,7 +106,7 @@ mod to_additive_hunks {
106106

107107
#[test]
108108
fn selections_and_full_hunks() {
109-
let with = vec![
109+
let wth = vec![
110110
hunk_header("-1,10", "+1,10"),
111111
hunk_header("-15,5", "+20,5"),
112112
hunk_header("-25,5", "+40,5"),
@@ -120,8 +120,8 @@ mod to_additive_hunks {
120120
hunk_header("-0,0", "+22,3"),
121121
// Last hunk isn't used
122122
],
123-
&with,
124-
&with,
123+
&wth,
124+
&wth,
125125
).unwrap(), @r#"
126126
(
127127
[
@@ -136,7 +136,7 @@ mod to_additive_hunks {
136136

137137
#[test]
138138
fn only_full_hunks() {
139-
let with = vec![
139+
let wth = vec![
140140
hunk_header("-1,10", "+1,10"),
141141
hunk_header("-15,5", "+20,5"),
142142
hunk_header("-25,5", "+40,5"),
@@ -148,8 +148,8 @@ mod to_additive_hunks {
148148
hunk_header("-15,5", "+20,5"),
149149
// Last hunk isn't used
150150
],
151-
&with,
152-
&with,
151+
&wth,
152+
&wth,
153153
).unwrap(), @r#"
154154
(
155155
[
@@ -180,7 +180,7 @@ mod to_additive_hunks {
180180
// 99
181181
// -100
182182
// +119
183-
let with = vec![hunk_header("-93,8", "+93,10")];
183+
let wth = vec![hunk_header("-93,8", "+93,10")];
184184

185185
// diff --git a/file b/file
186186
// index 190423f..b513cb5 100644
@@ -203,7 +203,7 @@ mod to_additive_hunks {
203203

204204
insta::assert_debug_snapshot!(to_additive_hunks(
205205
[hunk_header("-96,1", "+0,0")],
206-
&with,
206+
&wth,
207207
&wth0,
208208
).unwrap(), @r#"
209209
(
@@ -215,7 +215,7 @@ mod to_additive_hunks {
215215
"#);
216216
insta::assert_debug_snapshot!(to_additive_hunks(
217217
[hunk_header("-96,1", "+0,0"), hunk_header("-0,0", "+96,2")],
218-
&with,
218+
&wth,
219219
&wth0,
220220
).unwrap(), @r#"
221221
(
@@ -228,7 +228,7 @@ mod to_additive_hunks {
228228
"#);
229229
insta::assert_debug_snapshot!(to_additive_hunks(
230230
[hunk_header("-0,0", "+96,2")],
231-
&with,
231+
&wth,
232232
&wth0,
233233
).unwrap(), @r#"
234234
(
@@ -242,7 +242,7 @@ mod to_additive_hunks {
242242

243243
#[test]
244244
fn real_world_issue() {
245-
let with = vec![hunk_header("-1,214", "+1,55")];
245+
let wth = vec![hunk_header("-1,214", "+1,55")];
246246
let wth0 = vec![
247247
hunk_header("-4,13", "+4,0"),
248248
hunk_header("-18,19", "+5,1"),
@@ -262,7 +262,7 @@ mod to_additive_hunks {
262262
hunk_header("-207,1", "+0,0"),
263263
hunk_header("-209,3", "+0,0"),
264264
],
265-
&with,
265+
&wth,
266266
&wth0,
267267
)
268268
.unwrap();
@@ -287,7 +287,7 @@ mod to_additive_hunks {
287287
hunk_header("-209,1", "+0,0"),
288288
hunk_header("-211,1", "+0,0"),
289289
],
290-
&with,
290+
&wth,
291291
&wth0,
292292
)
293293
.unwrap();
@@ -316,7 +316,7 @@ mod to_additive_hunks {
316316
hunk_header("-0,0", "+30,2"),
317317
hunk_header("-0,0", "+50,3"),
318318
],
319-
&with,
319+
&wth,
320320
&wth0,
321321
)
322322
.unwrap();
@@ -337,7 +337,7 @@ mod to_additive_hunks {
337337

338338
#[test]
339339
fn only_selections_workspace_example() {
340-
let with = vec![hunk_header("-1,10", "+1,10")];
340+
let wth = vec![hunk_header("-1,10", "+1,10")];
341341
let actual = to_additive_hunks(
342342
[
343343
// commit NOT '2,3' of the old
@@ -355,8 +355,8 @@ mod to_additive_hunks {
355355
// commit '19,20' of the new
356356
hunk_header("-0,0", "+9,2"),
357357
],
358-
&with,
359-
&with,
358+
&wth,
359+
&wth,
360360
)
361361
.unwrap();
362362
insta::assert_debug_snapshot!(actual, @r#"

crates/but-server/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ async fn handle_command(
343343
"git_set_local_config" => legacy::repo::git_set_local_config_cmd(request.params),
344344
"check_signing_settings" => legacy::repo::check_signing_settings_cmd(request.params),
345345
"git_clone_repository" => legacy::repo::git_clone_repository_cmd(request.params).await,
346-
"get_uncommited_files" => legacy::repo::get_uncommited_files_cmd(request.params),
346+
"get_uncommitted_files" => legacy::repo::get_uncommitted_files_cmd(request.params),
347347
"get_commit_file" => legacy::repo::get_commit_file_cmd(request.params),
348348
"get_workspace_file" => legacy::repo::get_workspace_file_cmd(request.params),
349349
"find_files" => legacy::repo::find_files_cmd(request.params),

crates/but-workspace/tests/workspace/commit_engine/refs_update.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,11 +1506,11 @@ fn commit_on_top_of_branch_in_workspace() -> anyhow::Result<()> {
15061506
let rewritten_head_id = repo.head_id()?;
15071507
// The empty commit was inserted.
15081508
insta::assert_snapshot!(visualize_commit_graph(&repo, rewritten_head_id)?, @r"
1509-
* 4e7e322 (HEAD -> merge) Merge branch 'A' into merge
1509+
* f3de308 (HEAD -> merge) Merge branch 'A' into merge
15101510
|\
15111511
| * 608f07b (s1-b/top) remove 5 lines from beginning
15121512
| * 7f389ed (s1-b/below-top, A) add 10 to the beginning
1513-
* | 262b17d (s2-b/top) empty commit
1513+
* | e43241c (s2-b/top) empty commit
15141514
* | b5ec010 remove 5 lines from the end
15151515
* | 91ef6f6 (s2-b/below-top, B) add 10 to the end
15161516
|/

crates/but-workspace/tests/workspace/ref_info/with_workspace_commit/journey/exhaustive_with_squash_merges.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,9 @@ The remote was reused and merged once more with more changes.
868868
| * 9a2fcdf two
869869
|/
870870
* 3234835 one
871-
| * 8965172 (origin/main) other remote file changed completely afterwards
872-
| * 9096eba squash origin/S1
873-
| * ccaef5a avoid merge conflict
871+
| * 35faa22 (origin/main) other remote file changed completely afterwards
872+
| * 293873a squash origin/S1
873+
| * 4ac7bc7 avoid merge conflict
874874
| * adc9f0c (main) file changed completely afterwards
875875
| * d110262 squash S1
876876
|/
@@ -974,11 +974,11 @@ A new multi-segment stack is created without remote and squash merged locally.
974974
|/|
975975
* | 3234835 one
976976
|/
977-
| * 639afcf (origin/main) local file rewritten completely
978-
| * ca783a4 squash local
979-
| * 8965172 (main) other remote file changed completely afterwards
980-
| * 9096eba squash origin/S1
981-
| * ccaef5a avoid merge conflict
977+
| * 350fd89 (origin/main) local file rewritten completely
978+
| * 2eb07c5 squash local
979+
| * 35faa22 (main) other remote file changed completely afterwards
980+
| * 293873a squash origin/S1
981+
| * 4ac7bc7 avoid merge conflict
982982
| * adc9f0c file changed completely afterwards
983983
| * d110262 squash S1
984984
|/
@@ -1041,7 +1041,7 @@ A new multi-segment stack is created without remote and squash merged locally.
10411041
ref_name: "►local",
10421042
remote_tracking_ref_name: "None",
10431043
commits: [
1044-
LocalCommit(1af5d57, "new local file\n", integrated(ca783a4)),
1044+
LocalCommit(1af5d57, "new local file\n", integrated(2eb07c5)),
10451045
],
10461046
commits_on_remote: [],
10471047
commits_outside: None,
@@ -1054,7 +1054,7 @@ A new multi-segment stack is created without remote and squash merged locally.
10541054
ref_name: "►local-bottom",
10551055
remote_tracking_ref_name: "None",
10561056
commits: [
1057-
LocalCommit(de02b20, "new local-bottom file\n", integrated(ca783a4)),
1057+
LocalCommit(de02b20, "new local-bottom file\n", integrated(2eb07c5)),
10581058
],
10591059
commits_on_remote: [],
10601060
commits_outside: None,
@@ -1076,7 +1076,7 @@ A new multi-segment stack is created without remote and squash merged locally.
10761076
),
10771077
target_commit: Some(
10781078
TargetCommit {
1079-
commit_id: Sha1(8965172e9a9c1649a2f87e645ae42ffb7f11680c),
1079+
commit_id: Sha1(35faa22c8d0a01ba45da3971406eab6932b1bbde),
10801080
segment_index: NodeIndex(2),
10811081
},
10821082
),

0 commit comments

Comments
 (0)