git-ghost icon indicating copy to clipboard operation
git-ghost copied to clipboard

Recursive list

Open dtaniwaki opened this issue 6 years ago • 3 comments

It might be helpful if we can list hashes recursively.

e.g.

abcdef => bcdef2 => 32dce1
                               -> 43de1
                               -> 211e1
             => ce3183

dtaniwaki avatar Apr 10 '19 02:04 dtaniwaki

I'm still thinking which format is better, graph or tree for recursive list.

Graph

* aaa
*   bbb
|\
| * ccc
* |   ddd
|\ \
| * | eee
* | |   fff
|\ \ \
| * | | ggg
* | | |   hhh
|\ \ \ \
| * | | | iii
* | | | |   jjj
|\ \ \ \ \
| * | | | | kkk
* | | | | |   lll
|\ \ \ \ \ \
| * | | | | | mmm
| | |_|_|_|/
| |/ 
*     nnn
* ooo
...

Tree

a
├── a1
│   ├── a1a
│   └── a1b
└── a2
    └── a2a
        ├── a2a1
        │   └── a2a1a
        ├── a2a2
        │   └── a2a2a
        └── a2a3
            └── a2a3a

The graph format is useful for commits branch transitions as git commits may eventually join up while the tree format is more useful for diff branches because no transitions should continue after each diff.

dtaniwaki avatar Apr 10 '19 02:04 dtaniwaki

asciidag may be helpful if we go with DAG.

dtaniwaki avatar Apr 10 '19 02:04 dtaniwaki

@everpeace commented in the original issue as below:

wow, impressive.

I just thought one thing. for example, assume we have two commit branch

a1 --> a1a a2 --> a1a

then, a2-->a1a might contains commit a1.

In this case, how does output look like??

dtaniwaki avatar Apr 10 '19 02:04 dtaniwaki