From 1eb5b7ca011002c370c48cce8c5a80efc27b4e9a Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 29 Dec 2023 23:21:18 +0530 Subject: [PATCH] fix: adjust for gix 0.57.0 --- src/git.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git.rs b/src/git.rs index e586d79..150de2e 100644 --- a/src/git.rs +++ b/src/git.rs @@ -1,6 +1,6 @@ use crate::model::PersistableRepo; use anyhow::Context; -use gix::{sec::trust::DefaultForLevel, Repository, ThreadSafeRepository}; +use gix::{remote::Direction, sec::trust::DefaultForLevel, Repository, ThreadSafeRepository}; use std::{ collections::HashMap, fs, @@ -142,7 +142,7 @@ fn get_current_branch(repository: &Repository) -> Option { fn get_remote_for_branch(repository: &Repository, branch_name: Option<&str>) -> Option { let branch_name = branch_name?; repository - .branch_remote_name(branch_name) + .branch_remote_name(branch_name, Direction::Fetch) .map(|n| n.as_bstr().to_string()) }