From 4680cd1e97731c2bdf97b996e11017d84f365376 Mon Sep 17 00:00:00 2001 From: blyxyas Date: Tue, 12 Sep 2023 23:02:42 +0200 Subject: [PATCH] Remove testing attempt --- src/remote.rs | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/remote.rs b/src/remote.rs index 6106b94860..15751d0c98 100644 --- a/src/remote.rs +++ b/src/remote.rs @@ -756,7 +756,6 @@ impl RemoteRedirect { #[cfg(test)] mod tests { - use crate::build::RepoBuilder; use crate::{AutotagOption, PushOptions}; use crate::{Direction, FetchOptions, Remote, RemoteCallbacks, Repository}; use std::cell::Cell; @@ -1120,43 +1119,4 @@ mod tests { assert_eq!(flag, 7); assert_eq!(remote_repo.branches(None).unwrap().count(), 3); } - - #[test] - fn shallow_clone() { - let (td, repo) = crate::test::repo_init(); - - let commit = repo.head().unwrap().target().unwrap(); - let first_commit = repo.find_commit(commit).unwrap(); - - let sig = repo.signature().unwrap(); - let mut index = repo.index().unwrap(); - let tree = index.write_tree().unwrap(); - let tree = repo.find_tree(tree).unwrap(); - - let second_commit = repo.commit( - Some("HEAD"), - &sig, - &sig, - "second commit", - &tree, - &[&first_commit] - ).unwrap(); - - let td2 = TempDir::new().unwrap(); - let mut fo = FetchOptions::new(); - fo.depth(1); - - let new_repo = RepoBuilder::new() - .fetch_options(fo) - .clone(&td.into_path().as_os_str().to_str().unwrap(), td2.path()) - .unwrap(); - - dbg!(new_repo.is_shallow()); - - let _ = dbg!(new_repo.find_commit(first_commit.id())); // ???? - let _ = dbg!(new_repo.find_commit(second_commit)); - - // Check that there's only one commit - panic!(); - } }