Unified · Split
| @@ -1,7 +1,5 @@ | ||
| 1 | 1 | use crate::remote; |
| 2 | −use git_odb::Find; | |
| 3 | 2 | use git_repository as git; |
| 4 | −use git_repository::remote::fetch::Status; | |
| 5 | 3 | |
| 6 | 4 | #[test] |
| 7 | 5 | #[cfg(feature = "blocking-network-client")] |
| @@ -38,8 +36,9 @@ fn fetch_only_with_configuration() -> crate::Result { · 30 unmodified lines | ||
| 38 | 36 | |
| 39 | 37 | assert_eq!(out.ref_map.mappings.len(), 13); |
| 40 | 38 | match out.status { |
| 41 | − Status::Change { update_refs, .. } => { | |
| 39 | + git_repository::remote::fetch::Status::Change { update_refs, .. } => { | |
| 42 | 40 | for edit in &update_refs.edits { |
| 41 | + use git_odb::Find; | |
| 43 | 42 | assert!( |
| 44 | 43 | repo.objects.contains(edit.change.new_value().expect("always set").id()), |
| 45 | 44 | "part of the fetched pack" |
| @@ -51,6 +50,16 @@ fn fetch_only_with_configuration() -> crate::Result { · 5 unmodified lines | ||
| 51 | 50 | Ok(()) |
| 52 | 51 | } |
| 53 | 52 | |
| 53 | +#[test] | |
| 54 | +#[cfg(feature = "blocking-network-client")] | |
| 55 | +fn fetch_only_without_configuration() -> crate::Result { | |
| 56 | + let tmp = git_testtools::tempfile::TempDir::new()?; | |
| 57 | + let (repo, _out) = git::prepare_clone_bare(remote::repo("base").path(), tmp.path())? | |
| 58 | + .fetch_only(git::progress::Discard, &std::sync::atomic::AtomicBool::default())?; | |
| 59 | + assert!(repo.find_remote("origin").is_ok(), "default remote name is 'origin'"); | |
| 60 | + Ok(()) | |
| 61 | +} | |
| 62 | + | |
| 54 | 63 | #[test] |
| 55 | 64 | fn clone_and_early_persist_without_receive() -> crate::Result { |
| 56 | 65 | let tmp = git_testtools::tempfile::TempDir::new()?; |