Rev parse #648

Closed
wants to merge 27 commits into
from
Commits on Apr 27, 2012
  1. First stab at implementation of rev-parse.

    Ben Straub committed Apr 25, 2012
    This version supports refspecs of these kinds:
    - Full & partial SHAs
    - Output from "git describe"
    - "/refs/heads/master" (full ref names)
    - "master" (partial ref names)
    - "FETCH_HEAD" (named heads)
  2. Simpler states and initial structure.

    Ben Straub committed Apr 26, 2012
    New tests for "foo^2" syntax, but they don't pass
    yet. Support for chaining these, i.e.
    "foo^2~3^{u}~1' is starting to shape up.
  3. Implemented partial caret syntax for rev-parse.

    Ben Straub committed Apr 26, 2012
    Supported forms:
    - "^n"
    - "^0"
    - "^"
    
    Still missing: all of the "^{…}" variants.
  4. Implemented rev-parse's "^{}" syntax.

    Ben Straub committed Apr 27, 2012
  5. Implemented rev-parse "^{type}" syntax.

    Ben Straub committed Apr 27, 2012
  6. Returning error if dereferencing operation fails.

    Ben Straub committed Apr 27, 2012
  7. Removed goto from state machine loop.

    Ben Straub committed Apr 27, 2012
  8. Implementing rev-parse's "ref~2" syntax.

    Ben Straub committed Apr 27, 2012
    Also extended the test suite to include chaining
    operators, e.g. "master^2~3^4".
Commits on Apr 30, 2012
  1. Adding comment documentation for rev-parse api.

    Ben Straub committed Apr 30, 2012
Commits on May 1, 2012
  1. Implementing rev-parse's ref@{n} and @{-n} syntaxes.

    Ben Straub committed May 1, 2012
    Added some reflags to the test repo to support
    unit tests.
  2. Rev-parse chaining: adding the longest chain

    Ben Straub committed May 1, 2012
    in the test repo.
  3. Incorporating feedback from @tanoku.

    Ben Straub committed May 1, 2012
    Removed repeated strlen's, and unnecessary loop-termination variable.
Commits on May 2, 2012
  1. Rev-parse: plugging (most) memory leaks.

    Ben Straub committed May 2, 2012
Commits on May 3, 2012
  1. Fixed last 2 memory leaks in rev-parse.

    Ben Straub committed May 3, 2012
  2. Rev-parse: "ref@{upstream}" syntax.

    Ben Straub committed May 3, 2012
    Added tracking configuration to the test repo's
    config to support unit tests.
  3. Fixing legacy unit tests.

    Ben Straub committed May 3, 2012
    New functionality introduced some new refs and
    tags in the test repo.
Commits on May 4, 2012
Commits on May 7, 2012
  1. Rev-parse: "ref^{/regex}" syntax.

    Ben Straub committed May 7, 2012
Commits on May 10, 2012
  1. Rev-parse: @{time} syntax.

    Ben Straub committed May 10, 2012
    Ported date.c (for approxidate_careful) from git.git
    revision aa39b85. Trimmed out the parts we're not
    using.
  2. Fixing broken tests.

    Ben Straub committed May 10, 2012
  3. Simplifying revparse_lookup_fully_qualified_ref.

    Ben Straub committed May 10, 2012
  4. Rev-parse: now capturing and reporting regex errors.

    Ben Straub committed May 10, 2012
  5. Plugging memory leak.

    Ben Straub committed May 10, 2012
  6. Rev-parse: regex check for "git describe" output.

    Ben Straub committed May 10, 2012
  7. Rev-parse: proper error checking.

    Ben Straub committed May 10, 2012