Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

internal/gps: Parse abbreviated git revisions #1027

Merged
merged 8 commits into from
Aug 28, 2017

Commits on Aug 17, 2017

  1. Parse abbreviated git revisions

    While dep doesn't want to encourage the use of abbreviated git commit
    identifiers, they come up frequently when we parse vendoring specifiers (like
    glide.yaml) of existing projects. We should give a shot at parsing these and
    then expanding them to their unabbreviated form.
    spenczar committed Aug 17, 2017
    Configuration menu
    Copy the full SHA
    531fb9c View commit details
    Browse the repository at this point in the history
  2. Change commitInfo to disambiguateRevision

    commitInfo returned a struct from an external package. This coupling isn't
    ideal, and we wouldn't use the extra info for anything. It's better to just have
    a method for exactly what we want, which is disambiguation of short revision
    specifiers.
    spenczar committed Aug 17, 2017
    Configuration menu
    Copy the full SHA
    dfb8719 View commit details
    Browse the repository at this point in the history
  3. Remove heuristic git hash detection

    Now that we are disambiguating revisions by going to the source, we
    don't need the heuristic check of string length and hex parseability
    anymore.
    spenczar committed Aug 17, 2017
    Configuration menu
    Copy the full SHA
    e0f7e1f View commit details
    Browse the repository at this point in the history
  4. Move revision disambiguation into a private method

    This just cleans up the SourceMgr implementation a bit.
    spenczar committed Aug 17, 2017
    Configuration menu
    Copy the full SHA
    6977b26 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2017

  1. Correctly document (*SourceMgr).InferConstraint

    The previous commit changed the order of prefernce when inferring
    constraints. Also, moved the bazaar GUID parsing stuff to make sure
    that it receives the same preference level as revisions for other
    repository types.
    spenczar committed Aug 28, 2017
    Configuration menu
    Copy the full SHA
    2d4b3c2 View commit details
    Browse the repository at this point in the history
  2. Handle bazaar revisions by talking to the actual repo

    String parsing was a little error prone, so we'd prefer to ask the
    bazaar repository whether a particular string is a valid revision ID.
    To do this, we need a very slightly custom version of
    disambiguateRevision for *bzrSource.
    
    This revision also refactors TestSourceManager_InferConstraint pretty
    dramatically to let it work on repositories coming from different
    VCSes.
    spenczar committed Aug 28, 2017
    Configuration menu
    Copy the full SHA
    960d21a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f19f8b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    49bf340 View commit details
    Browse the repository at this point in the history