promote src/git/ files to src/

Signed-off-by: Han Xu <keepsimple@gmail.com>
This commit is contained in:
Han Xu
2023-01-05 19:19:14 -08:00
parent 575d44e8b4
commit 60596232da
30 changed files with 133 additions and 133 deletions
@@ -3,7 +3,7 @@ use git_ref_format_test::gen;
use proptest::prelude::*;
use test_helpers::roundtrip;
use radicle_surf::git::Branch;
use radicle_surf::Branch;
proptest! {
#[test]
@@ -3,7 +3,8 @@ use std::path::Path;
use git_ref_format::refname;
use radicle_surf::{
fs::{self, Directory},
git::{Branch, Repository},
Branch,
Repository,
};
use super::GIT_PLATINUM;
@@ -2,7 +2,7 @@ use std::str::FromStr;
use proptest::prelude::*;
use radicle_git_ext::Oid;
use radicle_surf::git::{Author, Commit};
use radicle_surf::{Author, Commit};
use test_helpers::roundtrip;
proptest! {
@@ -17,7 +17,9 @@ use radicle_surf::{
Moved,
Stats,
},
git::{Branch, Error, Repository},
Branch,
Error,
Repository,
};
use std::{path::Path, str::FromStr};
+2 -1
View File
@@ -7,7 +7,8 @@ mod directory {
use git_ref_format::refname;
use radicle_surf::{
fs::{self, Entry},
git::{Branch, Repository},
Branch,
Repository,
};
use std::path::Path;
-27
View File
@@ -1,27 +0,0 @@
// Copyright © 2022 The Radicle Git Contributors
// SPDX-License-Identifier: GPL-3.0-or-later
//! Unit tests for radicle_surf::git and its submodules.
const GIT_PLATINUM: &str = "../data/git-platinum";
#[cfg(test)]
mod branch;
#[cfg(test)]
mod code_browsing;
#[cfg(test)]
mod commit;
#[cfg(test)]
mod diff;
#[cfg(test)]
mod last_commit;
#[cfg(test)]
mod namespace;
#[cfg(test)]
mod reference;
#[cfg(test)]
mod rev;
#[cfg(test)]
mod submodule;
#[cfg(test)]
mod threading;
@@ -2,7 +2,7 @@ use std::{path::PathBuf, str::FromStr};
use git_ref_format::refname;
use radicle_git_ext::Oid;
use radicle_surf::git::{Branch, Repository};
use radicle_surf::{Branch, Repository};
use super::GIT_PLATINUM;
+31 -1
View File
@@ -2,10 +2,40 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#[cfg(test)]
mod git;
const GIT_PLATINUM: &str = "../data/git-platinum";
#[cfg(test)]
mod file_system;
#[cfg(test)]
mod source;
#[cfg(test)]
mod branch;
#[cfg(test)]
mod code_browsing;
#[cfg(test)]
mod commit;
#[cfg(test)]
mod diff;
#[cfg(test)]
mod last_commit;
#[cfg(test)]
mod namespace;
#[cfg(test)]
mod reference;
#[cfg(test)]
mod rev;
#[cfg(test)]
mod submodule;
#[cfg(test)]
mod threading;
@@ -1,6 +1,6 @@
use git_ref_format::{name::component, refname, refspec};
use pretty_assertions::{assert_eq, assert_ne};
use radicle_surf::git::{Branch, Error, Glob, Repository};
use radicle_surf::{Branch, Error, Glob, Repository};
use super::GIT_PLATINUM;
@@ -1,5 +1,5 @@
use git_ref_format::refspec;
use radicle_surf::git::{Glob, Repository};
use radicle_surf::{Glob, Repository};
use super::GIT_PLATINUM;
@@ -1,7 +1,7 @@
use std::str::FromStr;
use git_ref_format::{name::component, refname};
use radicle_surf::git::{Branch, Error, Oid, Repository};
use radicle_surf::{Branch, Error, Oid, Repository};
use super::GIT_PLATINUM;
+1 -1
View File
@@ -1,7 +1,7 @@
use std::path::PathBuf;
use git_ref_format::refname;
use radicle_surf::git::Repository;
use radicle_surf::Repository;
use serde_json::json;
const GIT_PLATINUM: &str = "../data/git-platinum";
@@ -3,7 +3,7 @@
// An issue with submodules, see: https://github.com/radicle-dev/radicle-surf/issues/54
fn test_submodule_failure() {
use git_ref_format::refname;
use radicle_surf::git::{Branch, Repository};
use radicle_surf::{Branch, Repository};
let repo = Repository::discover(".").unwrap();
repo.root_dir(Branch::local(refname!("main"))).unwrap();
@@ -1,7 +1,7 @@
use std::sync::{Mutex, MutexGuard};
use git_ref_format::{name::component, refname};
use radicle_surf::git::{Branch, Error, Glob, Repository};
use radicle_surf::{Branch, Error, Glob, Repository};
use super::GIT_PLATINUM;