From a37a36e7f08467d6782f80a5c23e1b71caf3b1f7 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Tue, 28 Oct 2025 16:37:28 +0100 Subject: [PATCH 1/2] fix gitoxide warning --- asyncgit/src/sync/logwalker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asyncgit/src/sync/logwalker.rs b/asyncgit/src/sync/logwalker.rs index cbadeb1865..81a6fd321e 100644 --- a/asyncgit/src/sync/logwalker.rs +++ b/asyncgit/src/sync/logwalker.rs @@ -133,7 +133,7 @@ impl<'a> LogWalkerWithoutFilter<'a> { // reason this is 2^14, so benchmarking might reveal that there’s better values. repo.object_cache_size_if_unset(2_usize.pow(14)); - let commit = repo.head()?.peel_to_commit_in_place()?; + let commit = repo.head()?.peel_to_commit()?; let tips = [commit.id]; From a2a6e89108ed88b975be5fd31586cb47f4776cea Mon Sep 17 00:00:00 2001 From: extrawurst Date: Tue, 28 Oct 2025 16:41:20 +0100 Subject: [PATCH 2/2] do not allow deprecated fn --- asyncgit/src/lib.rs | 3 +- asyncgit/src/sync/remotes/mod.rs | 48 ++++++++------------------------ asyncgit/src/sync/submodules.rs | 2 +- 3 files changed, 15 insertions(+), 38 deletions(-) diff --git a/asyncgit/src/lib.rs b/asyncgit/src/lib.rs index 8f2efa1527..b9eccbe38c 100644 --- a/asyncgit/src/lib.rs +++ b/asyncgit/src/lib.rs @@ -15,7 +15,8 @@ It wraps libraries like git2 and gix. unused_must_use, dead_code, unstable_name_collisions, - unused_assignments + unused_assignments, + deprecated )] #![deny(clippy::all, clippy::perf, clippy::nursery, clippy::pedantic)] #![deny( diff --git a/asyncgit/src/sync/remotes/mod.rs b/asyncgit/src/sync/remotes/mod.rs index 6f1284f985..b32810dd9e 100644 --- a/asyncgit/src/sync/remotes/mod.rs +++ b/asyncgit/src/sync/remotes/mod.rs @@ -369,12 +369,8 @@ mod tests { let (remote_dir, _remote) = repo_init().unwrap(); let remote_path = remote_dir.path().to_str().unwrap(); let (repo_dir, _repo) = repo_clone(remote_path).unwrap(); - let repo_path: &RepoPath = &repo_dir - .into_path() - .as_os_str() - .to_str() - .unwrap() - .into(); + let repo_path: &RepoPath = + &repo_dir.keep().as_os_str().to_str().unwrap().into(); let remotes = get_remotes(repo_path).unwrap(); @@ -388,12 +384,8 @@ mod tests { let (remote_dir, _remote) = repo_init().unwrap(); let remote_path = remote_dir.path().to_str().unwrap(); let (repo_dir, _repo) = repo_clone(remote_path).unwrap(); - let repo_path: &RepoPath = &repo_dir - .into_path() - .as_os_str() - .to_str() - .unwrap() - .into(); + let repo_path: &RepoPath = + &repo_dir.keep().as_os_str().to_str().unwrap().into(); debug_cmd_print( repo_path, @@ -418,12 +410,8 @@ mod tests { let (remote_dir, _remote) = repo_init().unwrap(); let remote_path = remote_dir.path().to_str().unwrap(); let (repo_dir, _repo) = repo_clone(remote_path).unwrap(); - let repo_path: &RepoPath = &repo_dir - .into_path() - .as_os_str() - .to_str() - .unwrap() - .into(); + let repo_path: &RepoPath = + &repo_dir.keep().as_os_str().to_str().unwrap().into(); debug_cmd_print( repo_path, @@ -454,12 +442,8 @@ mod tests { let (remote_dir, _remote) = repo_init().unwrap(); let remote_path = remote_dir.path().to_str().unwrap(); let (repo_dir, _repo) = repo_clone(remote_path).unwrap(); - let repo_path: &RepoPath = &repo_dir - .into_path() - .as_os_str() - .to_str() - .unwrap() - .into(); + let repo_path: &RepoPath = + &repo_dir.keep().as_os_str().to_str().unwrap().into(); debug_cmd_print( repo_path, @@ -494,12 +478,8 @@ mod tests { let (remote_dir, _remote) = repo_init().unwrap(); let remote_path = remote_dir.path().to_str().unwrap(); let (repo_dir, repo) = repo_clone(remote_path).unwrap(); - let repo_path: &RepoPath = &repo_dir - .into_path() - .as_os_str() - .to_str() - .unwrap() - .into(); + let repo_path: &RepoPath = + &repo_dir.keep().as_os_str().to_str().unwrap().into(); debug_cmd_print( repo_path, @@ -530,12 +510,8 @@ mod tests { let (remote_dir, _remote) = repo_init().unwrap(); let remote_path = remote_dir.path().to_str().unwrap(); let (repo_dir, repo) = repo_clone(remote_path).unwrap(); - let repo_path: &RepoPath = &repo_dir - .into_path() - .as_os_str() - .to_str() - .unwrap() - .into(); + let repo_path: &RepoPath = + &repo_dir.keep().as_os_str().to_str().unwrap().into(); debug_cmd_print( repo_path, diff --git a/asyncgit/src/sync/submodules.rs b/asyncgit/src/sync/submodules.rs index f984ac0b19..cdf69d5105 100644 --- a/asyncgit/src/sync/submodules.rs +++ b/asyncgit/src/sync/submodules.rs @@ -182,7 +182,7 @@ mod tests { s.add_finalize().unwrap(); } - let repo_p = RepoPath::Path(dir.into_path()); + let repo_p = RepoPath::Path(dir.keep()); let subs = get_submodules(&repo_p).unwrap(); assert_eq!(subs.len(), 1);