onlywei / explain-git-with-d3

Use D3 to visualize simple git branching operations.
MIT License
1.71k stars 390 forks source link

New commits interrupt rendering of past commits #39

Closed dboone closed 8 years ago

dboone commented 8 years ago

If the user quickly enters git commit repeatedly, the rendering of the new commits appears to interrupt the rendering of past commits. It would be difficult to reproduce this behavior by typing the full command git commit repeatedly. Instead, type git commit once and then use the up arrow to select the previous command and press enter. Doing so in rapid succession results in something like the following: commit-bug

The generated code:

<g class="commits">
    <text class="id-label" x="590" y="114">d80cc13..</text>
    <text class="id-label" x="500" y="114">930215d..</text>
    <text class="id-label" x="410" y="114">78a3c03..</text>
    <text class="id-label" x="320" y="114">9c30525..</text>
    <text class="id-label" x="230" y="114">da24642..</text>
    <text class="id-label" x="140" y="114">1fb4ff4..</text>
    <text class="id-label" x="50" y="114">e137e9b..</text>
    <circle id="ExplainGitCommit-e137e9b" class="commit" cx="50" cy="80" r="20"></circle>
    <circle id="ExplainGitCommit-1fb4ff4" class="commit" cx="140" cy="80" r="20"></circle>
    <circle id="ExplainGitCommit-da24642" class="commit" cx="230" cy="80" r="1.7241377279999999"></circle>
    <circle id="ExplainGitCommit-9c30525" class="commit" cx="320" cy="80" r="3.093314208"></circle>
    <circle id="ExplainGitCommit-78a3c03" class="commit" cx="410" cy="80" r="1.744826144"></circle>
    <circle id="ExplainGitCommit-930215d" class="commit" cx="500" cy="80" r="2.4304032960000006"></circle>
    <circle id="ExplainGitCommit-d80cc13" class="commit checked-out" cx="590" cy="80" r="20"></circle>
</g>

Notice the radius of each commit circle.

Finally, I wanted to say thank you for this extremely useful tool!

dboone commented 8 years ago

I initially discovered this using the version at http://www.wei-wang.com/ExplainGitWithD3/. I just tested the version at http://onlywei.github.io/explain-git-with-d3/ and it behaves the same with regard to this issue.

dboone commented 8 years ago

Relevant StackOverflow question.