data structures - git: DAG vs. tree? -



data structures - git: DAG vs. tree? -

i've read git uses directed acyclic graph (dag) info structure, each commit node, , things branches , tags pointers nodes.

but when seek visualize commit history using tools gitk, looks more tree graph since every parent-child relationship directed 1 way.

so, what's difference between dag , tree, regards git?

but when seek visualize commit history using tools gitk, looks more tree graph since every parent-child relationship directed 1 way.

a dag, tree, can laid out such parent-child relationships one-way. difference between them nodes in dag can have multiple parents. mutual case of in git when merge. merge commit have of commits merged parents. tree doesn't allow nodes have multiple parents.

(image source)

notice how merge commit c6 has 2 parents, c4 , c5.

git data-structures

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -