mirror of
https://github.com/qwjyh/xdbm
synced 2025-04-20 19:55:49 +09:00
Compare commits
2 commits
4fcb7fc354
...
51fd4207ea
Author | SHA1 | Date | |
---|---|---|---|
51fd4207ea | |||
c9eb34aa69 |
1 changed files with 5 additions and 4 deletions
|
@ -151,12 +151,13 @@ mod integrated_test {
|
|||
let upstream_name = "remote";
|
||||
let mut repo_1_remote =
|
||||
repo_1.remote(upstream_name, bare_repo_dir.path().to_str().unwrap())?;
|
||||
repo_1_remote.push(&["refs/heads/main"], None)?;
|
||||
repo_1_remote.push(&[repo_1.head().unwrap().name().unwrap()], None)?;
|
||||
trace!("bare repo {:?}", bare_repo_dir.display());
|
||||
println!("{:?}", bare_repo_dir.read_dir()?);
|
||||
// set up upstream branch
|
||||
let (mut repo_1_branch, _branch_type) = repo_1.branches(None)?.next().unwrap()?;
|
||||
repo_1_branch.set_upstream(Some(format!("{}/{}", upstream_name, "main").as_str()))?;
|
||||
println!("head {}", repo_1.head().unwrap().name().unwrap());
|
||||
repo_1_branch.set_upstream(Some(format!("{}/{}", upstream_name, repo_1_branch.name().unwrap().unwrap()).as_str()))?;
|
||||
|
||||
// 2nd device
|
||||
let config_dir_2 = assert_fs::TempDir::new()?;
|
||||
|
@ -225,12 +226,12 @@ mod integrated_test {
|
|||
let upstream_name = "remote";
|
||||
let mut repo_1_remote =
|
||||
repo_1.remote(upstream_name, bare_repo_dir.path().to_str().unwrap())?;
|
||||
repo_1_remote.push(&["refs/heads/main"], None)?;
|
||||
repo_1_remote.push(&[repo_1.head().unwrap().name().unwrap()], None)?;
|
||||
trace!("bare repo {:?}", bare_repo_dir.display());
|
||||
println!("{:?}", bare_repo_dir.read_dir()?);
|
||||
// set up upstream branch
|
||||
let (mut repo_1_branch, _branch_type) = repo_1.branches(None)?.next().unwrap()?;
|
||||
repo_1_branch.set_upstream(Some(format!("{}/{}", upstream_name, "main").as_str()))?;
|
||||
repo_1_branch.set_upstream(Some(format!("{}/{}", upstream_name, repo_1_branch.name().unwrap().unwrap()).as_str()))?;
|
||||
|
||||
// 2nd device
|
||||
let config_dir_2 = assert_fs::TempDir::new()?;
|
||||
|
|
Loading…
Add table
Reference in a new issue