Skip to content

Make url optional via a new "cred" feature gate for credential helpers #1168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshtriplett
Copy link
Member

Add an enabled-by-default feature flag for credential helpers, which are
the only uses of the url crate. This reduces a
default-features = false build of git2 from 54 dependencies to 17, for
a configuration that many tools (e.g. anything that only cares about
local repositories) can happily use.

In addition to enabling it by default, make the "https" and "ssh"
features depend on "cred".

@rustbot rustbot added the S-waiting-on-review Status: Waiting on review label Jun 18, 2025
Add an enabled-by-default feature flag for credential helpers, which are
the only uses of the `url` crate. This reduces a
`default-features = false` build of git2 from 54 dependencies to 17, for
a configuration that many tools (e.g. anything that only cares about
local repositories) can happily use.

In addition to enabling it by default, make the "https" and "ssh"
features depend on "cred".
joshtriplett added a commit to joshtriplett/lstr that referenced this pull request Jun 18, 2025
…inary size

With current git2, this reduces lstr from 144 dependencies to 137, and
from 4.3M to 3.6M.

With rust-lang/git2-rs#1168 merged into upstream
git2-rs, it further reduces lstr to 107 dependencies (though with
negligible additional improvement to binary size as the additional
dependencies were compiled out).
joshtriplett added a commit to joshtriplett/lstr that referenced this pull request Jun 18, 2025
…inary size

With current git2, this reduces lstr from 144 dependencies to 137, and
from 4.3M to 3.6M.

With rust-lang/git2-rs#1168 merged into upstream
git2-rs, it further reduces lstr to 106 dependencies (though with
negligible additional improvement to binary size as the additional
dependencies were compiled out).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting on review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants