mirror of
https://github.com/msfjarvis/gitice
synced 2025-08-17 04:27:01 +05:30
fix(rust): switch to stable
This commit is contained in:
parent
88418f7c46
commit
5c40422e41
4 changed files with 22 additions and 21 deletions
38
src/git.rs
38
src/git.rs
|
@ -57,24 +57,26 @@ pub fn freeze_repos(dir: &str) -> anyhow::Result<()> {
|
|||
let repository = shared_repo.to_thread_local();
|
||||
let branch = get_current_branch(&repository);
|
||||
let remote = get_remote_for_branch(&repository, branch.as_deref());
|
||||
if let Some(branch) = branch
|
||||
&& let Some(remote) = remote
|
||||
{
|
||||
let remote_url = get_url(&repository, &remote);
|
||||
let relative_path = entry
|
||||
.path()
|
||||
.strip_prefix(Path::new(dir))?
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.to_string();
|
||||
repos.insert(
|
||||
relative_path,
|
||||
PersistableRepo {
|
||||
remote_url,
|
||||
head: branch,
|
||||
},
|
||||
);
|
||||
}
|
||||
let Some(branch) = branch else {
|
||||
continue;
|
||||
};
|
||||
let Some(remote) = remote else {
|
||||
continue;
|
||||
};
|
||||
let remote_url = get_url(&repository, &remote);
|
||||
let relative_path = entry
|
||||
.path()
|
||||
.strip_prefix(Path::new(dir))?
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.to_string();
|
||||
repos.insert(
|
||||
relative_path,
|
||||
PersistableRepo {
|
||||
remote_url,
|
||||
head: branch,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#![feature(let_chains)]
|
||||
#![allow(clippy::missing_errors_doc, clippy::missing_panics_doc)]
|
||||
pub mod cli;
|
||||
pub mod git;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue