chore(deps): bump git2 from 0.20.4 to 0.21.0 (#703)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gregory Schier <gschier1990@gmail.com>
This commit is contained in:
dependabot[bot]andGregory Schier authored and GitHub committed 2026-09-24 22:09:33 -07:00
1 parent a0d71eb486
commit b03c41b767
8 files changed
+31 -50

No files matched your search

+2 -1
View File
@@ -99,7 +99,7 @@ pub(crate) fn get_default_remote_name_in_repo(repo: &Repository) -> Result<Strin
}
// if `origin` exists return that
let found_origin = remotes.iter().any(|r| r.is_some_and(|r| r == DEFAULT_REMOTE_NAME));
let found_origin = remotes.iter().any(|r| matches!(r, Ok(Some(r)) if r == DEFAULT_REMOTE_NAME));
if found_origin {
return Ok(DEFAULT_REMOTE_NAME.into());
}
@@ -109,6 +109,7 @@ pub(crate) fn get_default_remote_name_in_repo(repo: &Repository) -> Result<Strin
let first_remote = remotes
.iter()
.next()
.and_then(|r| r.ok())
.flatten()
.map(String::from)
.ok_or_else(|| GenericError("no remote found".into()))?;