Skip to content
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

Change git dependencies to use HEAD by default #9133

Merged
merged 4 commits into from
Feb 10, 2021

Commits on Feb 4, 2021

  1. Change git dependencies to use HEAD by default

    This commit follows through with work started in rust-lang#8522 to change the
    default behavior of `git` dependencies where if not branch/tag/etc is
    listed then `HEAD` is used instead of the `master` branch. This involves
    also changing the default lock file format, now including a `version`
    marker at the top of the file notably as well as changing the encoding
    of `branch=master` directives in `Cargo.toml`.
    
    If we did all our work correctly then this will be a seamless change.
    First released on stable in 1.47.0 (2020-10-08) Cargo has been emitting
    warnings about situations which may break in the future. This means that
    if you don't specify `branch = 'master'` but your HEAD branch isn't
    `master`, you've been getting a warning. Similarly if your dependency
    graph used both `branch = 'master'` as well as specifying nothing, you
    were receiving warnings as well. These two situations are broken by this
    commit, but it's hoped that by giving enough times with warnings we
    don't actually break anyone in practice.
    alexcrichton committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    7dd9872 View commit details
    Browse the repository at this point in the history
  2. Fix a bug loading v2 lockfiles

    This commit fixes a bug in Cargo where after `DefaultBranch` and
    `Branch("master")` are considered distinct no v2 lockfile would by
    default match a dependency specification with the `branch = 'master'`
    annotation. A feature of the v2 lockfile, however, is that no mention of
    a branch is equivalent to the `master` branch.
    
    The bug here is fixed by updating the code which registers a previous
    lock file with our `PackageRegistry`. This code registers nodes, only
    with v2 lock files, for both default and `master` branch git
    dependencies. This way requests for either one will get matched now that
    they're considered distinct.
    alexcrichton committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    c4b53c9 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2021

  1. Configuration menu
    Copy the full SHA
    1fefa5d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f2ce1f View commit details
    Browse the repository at this point in the history