GitoxideLabs / gitoxide

An idiomatic, lean, fast & safe pure Rust implementation of Git
Apache License 2.0
8.91k stars 303 forks source link

Unable to fetch with only extra_refspecs #1562

Closed skeggse closed 1 month ago

skeggse commented 1 month ago

Current behavior 😯

Cannot perform a meaningful fetch operation without any configured ref-specs

Expected behavior 🤔

Successful fetch

Git behavior

git remote show origin -n seems to indicate that it happily won't update anything.

Steps to reproduce 🕹

let mut options = gix::remote::ref_map::Options::default();
options.extra_refspecs.push(gix::refspec::parse("adc83b19e793491b1c6ea0fd8b46cd9f32e592fc".as_ref().into(), gix::refspec::parse::Operation::Fetch).unwrap().to_owned());

prepare_fetch(gix::progress::Discard, options) // -> prepare::Error::MissingRefSpecs
Byron commented 1 month ago

Thanks a lot for reporting - a fix is on the way.