mirror of
https://seed.radicle.dev/rad:zwTxygwuz5LDGBq255RA2CbNGrz8.git
synced 2026-10-18 19:30:29 +08:00
refactor: drop debug log messages
Not useful. Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
@@ -190,27 +190,18 @@ impl EventFilter {
|
||||
|
||||
fn is_default_branch(repo_id: &RepoId, wanted: &str) -> bool {
|
||||
let res = get_default_branch(repo_id);
|
||||
logger::debug2(format!("is_default_branch: res={res:?}"));
|
||||
if let Ok(actual) = res {
|
||||
logger::debug2(format!(
|
||||
"is_default_branch: actual={actual} wanted={wanted}"
|
||||
));
|
||||
actual == wanted
|
||||
} else {
|
||||
logger::debug("is_default_branch: could not get actual");
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fn get_default_branch(repo_id: &RepoId) -> Result<String, Box<dyn std::error::Error>> {
|
||||
let profile = Profile::load()?;
|
||||
logger::debug("loaded profile");
|
||||
let path = profile.storage.path().join(repo_id.canonical());
|
||||
logger::debug2(format!("path={}", path.display()));
|
||||
let repo = Repository::open(path, *repo_id)?;
|
||||
logger::debug("loaded repo");
|
||||
let proj = repo.project()?;
|
||||
logger::debug("loaded project");
|
||||
|
||||
let def = format!(
|
||||
"{}/refs/heads/{}",
|
||||
|
||||
Reference in New Issue
Block a user