Conversation
|
@liuliu-dev DOLT
|
|
@liuliu-dev DOLT
|
|
@liuliu-dev DOLT
|
|
@liuliu-dev DOLT
|
|
A couple of output graphs in code blocks would be cool to see. |
timsehn
left a comment
There was a problem hiding this comment.
Probably needs a couple bats tests.
5695942 to
5ce04ab
Compare
|
@liuliu-dev DOLT
|
5ce04ab to
c924c8c
Compare
|
@liuliu-dev DOLT
|
c924c8c to
abacfb2
Compare
|
@liuliu-dev DOLT
|
macneale4
left a comment
There was a problem hiding this comment.
I'm realizing now that I need a higher level description of the algorithm in order to properly review this. I want you to be overly heavy on documentation of fields and functions. Comments in functions are almost always a sign that the function is too complex, and should be broken into multiple functions. Not always, just a rule of thumb. I'm seeing some pretty long functions in this code, and the descriptions of what they each do doesn't come close to the amount of code in the function.
|
@liuliu-dev DOLT
|
|
@liuliu-dev DOLT
|
macneale4
left a comment
There was a problem hiding this comment.
Coming together! I think one more rev and you'll be good to go
go/cmd/dolt/commands/log_graph.go
Outdated
| * | ||
| */ | ||
|
|
||
| type CommitInfoWithChildren struct { |
There was a problem hiding this comment.
This type is only used in the package, so make it start with a lower case letter (makes it package private)
|
@liuliu-dev DOLT
|
|
@liuliu-dev DOLT
|
|
@liuliu-dev DOLT
|
|
@coffeegoddd DOLT
|
macneale4
left a comment
There was a problem hiding this comment.
. o ..
o . o o.o
...oo
__[]__
__|_o_o_o\__
\""""""""""/
\. .. . /
^^^^^^^^^^^^^^^^^^^^
command:
dolt log --graphSteps for Drawing the Commit Graph
Row Position: Determined by the commit's topological order, initialized using the index in the list. Adjust the vertical spacing between commits based on the commit message's height in
expandGraphfunction.Column Position, calculated based on the positions of child commits, implemented in
computeColumnEndsfunction:Place a
*at each commit's calculated position to mark it.Connect commits using vertical (
|) and diagonal (\or/) lines to represent branches and merges.An example of the graph of us-jails: