Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Commits on Apr 16, 2012
  1. Parse asterisks as nodes

    This might need some refinement in order to satisfy #18, since sometimes
    asterisks are used to represent "more history happened here, but we
    don't care what exactly".
  2. Don't allow nodes to overlap edges or other nodes

    We allow Graphviz to reposition nodes slightly and draw curved edges to
    make this possible.
    Fixes #3. Also fixes some overlap seen in the
    howto/separating-topic-branches.txt diagrams.
  3. Fix parsing of diagram from howto/separating-topic-branches.txt

    There were two bugs here:
    1. We weren't allowing a pipe to succeed a slash.
    2. We were allowing nodes to appear next to edges instead of at the
    end of them.
    The former was fixed by adding pipe as a valid edge character after a
    slash. The latter was fixed by explicitly specifying whether a node is
    allowed or not after following a given edge character. Nodes are always
    allowed except in two cases:
    1. When performing the initial traversal away from another node (i.e.,
    two nodes can't be adjacent).
    2. When looking for a pipe character directly beneath a slash (see
  4. Allow node names like "r2'"

    This just involved loosening NODE_REGEXP a bit.
  5. Fix typo in test name

  6. Don't parse graphs in test setup method

    This makes it easier to debug a single test, because only the code for
    that one test will run. Most graphs were moved down into the single test
    method that uses them. Graphs that are used by more than one test were
    left in setup, but changed to just be strings instead of parsed graphs.
    The tests that use each graph now handle the parsing.
  7. Allow node names to be suffixed with numbers

    I had to remove the use of String#rindex and replace it with a custom
    function that finds the earliest match that ends at a given index. For
    example, take a string "a-b2" and a regex /\w[0-9]?/. String#rindex will
    return 3, while the new String#index_of_earliest_match_ending_at will
    return 2.
Commits on Apr 15, 2012
  1. Merge pull request #17 from aroben/travis

    Add support for Travis CI
Commits on Apr 4, 2012
  1. Fix typo from 7bf95e8

  2. Allow node names like Y*

    This was a regression caused by
  3. Parse more branch labels before looking for nodes

    Now we parse unarrowed branch labels, arrowed branch labels, and quoted
    branch labels all before starting to look for nodes. This required
    making us more strict about the type of node names we'll accept
    (basically now just "x" or "x'").
    As a nice side-effect, Node#label no longer returns a quoted string for
    branch labels that were originally quoted. Also, quoted branch labels
    that are directly adjacent to a node are no longer merged with that
  4. Move disconnected node detection to AsciiDag.parse

    This seems more like the parser's job than Graph's job, since the parser
    is the one that made the mistake in thinking these labels were nodes in
    the first place.
  5. Make Node assign its own ID

    We now keep a class variable that keeps track of the global number of
    Nodes ever created, and use that to set Nodes' IDs in the constructor.
  6. Add String#substring_after

Commits on Apr 2, 2012
  1. Remove quotes from branch labels

    Fixes #14.
  2. Treat numbers that are parents as nodes, not labels

    We now treat a candidate node as a label if it has no parents and is not
    the parent of any other node, regardless of its label.
    This fixes another regression caused by
    e450c43, which was fixing #7.
  3. Treat numbers with parent nodes as nodes, not labels

    This fixes a regression caused by
    e450c43, which was fixing #7.
  4. Make tests more readble by using single-quote heredocs

    This flavor of heredoc doesn't require us to escape backslashes.
  5. Follow pipe characters that are directly beneath slashes

    This construction appears in at least one diagram in the Git docs.
    The main fix here was to add an option to the `/` entry in the
    `next_steps` hash to say that pipes are allowed to appear directly below
    slashes, and to add an option to the `|` entry `next_steps` hash that
    says pipes can be traversed downwards in addition to upwards.
     But allowing pipes to be traversed in both directions could cause
    infinite recursion when traversing two pipe characters that are directly
    on top of each other. So we now keep track of the direction we're
    traveling along the Y axis as we traverse edges, and each option in the
    `next_steps` hash now contains an associated direction. This allows us
    not to switch from moving down a pipe to moving back up it.
    Fixes #10.
  6. Make edge following more strict

    When following edges we keep track of what edge characters are allowed
    next. These prevents following edges such as:
    And fixes a bug where, when trying to find parent nodes for B, we'd
    traverse from B to \ to A in situations like this:
    A B
    The edge-traversing algorithm is now much more data-driven. We use a
    hash that describes what to do next for each type of edge character, as
    well as what to do at the very start of the search.
    This changed the sort order of parent nodes in some situations. We
    should probably apply some overall sort to the parent nodes so they
    aren't so sensitive to the traversal algorithm.
    Fixes #5. Also improves #7 slightly, because there are no longer arrows
    pointing from numbered labels to nodes. There are still circles around
    the numbered labels though.
  7. Add find_all_nodes

  8. Render apostrophes as primes in dot output

    The Git docs use apostrophes as a poor-man's prime symbol. Now we use
    real prime symbols in the dot output.
    Fixes #9.
Commits on Mar 29, 2012
  1. Allow colons in branch names

    At least one Git manpage does this (though perhaps accidentally).
  2. Position arrowed branch labels where their arrows start

    Since we remove the arrows from the output, we have to move the labels
    over to the left to compensate.
  3. Recognize branch labels preceded by arrows

    We just throw away the arrow currently. Eventually we should probably
    draw an arrow in the output.
  4. Rename Picasso to AsciiDag

Something went wrong with that request. Please try again.