Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor: drop debug log messages
Lars Wirzenius committed 1 year ago
commit c7ae4fbb2397f8a62aa5a4ad275fd927a0c01b03
parent 74097d6026f426405a0e547d1c5fa9b06bb5ce8c
1 file changed +0 -9
modified src/filter.rs
@@ -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/{}",