frewsxcv / rust-crates-index

Rust library for retrieving and interacting with the crates.io index
https://docs.rs/crates-index/
Apache License 2.0
72 stars 37 forks source link

Support git-fetch-with-cli #66

Closed epage closed 1 year ago

epage commented 3 years ago

And accompanying env variable CARGO_NET_GIT_FETCH_WITH_CLI

See https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

From https://github.com/rust-lang/cargo/pull/5914

epage commented 1 year ago

A CLI fallback won't be necessary anymore as gix aims to behave just like git

Bold :) but meh

Byron commented 1 year ago

Apologies, this issue was auto-closed which wasn't actually my intention nor my doing even though GitHub claims it was 😅. Could you recheck and let me know what concretely doesn't work? Because it gix should behave like git by default.

epage commented 1 year ago

Like I said, "meh". For me, it was (1) parity with cargo and (2) because people sometimes use the escape hatch. I myself don't use this and don't have particular test cases but was interested more on behalf of the users of my applications.

Byron commented 1 year ago

Thanks for elaborating the "meh" :).

For me, it was (1) parity with cargo and (2) because people sometimes use the escape hatch.

From what I could gather, support-fetch-with-cli was added to make certain git transport configurations work that can't be configured in cargo or aren't supported in git2. Being 'bold' once more I argue that gix powered libraries will behave like git and pick up all relevant configuration as well, thus an escape hatch shouldn't be required. If nonetheless something doesn't work, I consider this a bug in gix that should be fixed, rather than worked around.

With that in mind, I am closing this issue and hope that you can CC me in issues that arise from gix not performing as it should (I also searched the issues of cargo-release but couldn't find anything - probably that doesn't mean more than that I definitely need some pointers :)).

Thank you.