threads / announce / 12545

[announce] text-based tree visualizer

Subject: [announce] text-based tree visualizer

## tl;dr

15 messages between Mar 6, 2008 and Mar 18, 2008.

replies: 14people: 7as markdown or json

Jan Engelhardt· Mar 6, 2008, 17:48 UTC · lore
Hello everyone,

I spent the last two days writing a text-based tree visualizer; gitk is really convenient, but unfortunately it needs an X display, tigs tree view left me unimpressed, and I actually wanted a tool that does not read all commits in like gitk/tig do, but just gives me the treeview.

Screenshot: http://jengelh.hopto.org/other/git-forest.png Program (perl): http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest Top of file contains option overview.

Feedback is welcome.

thanks, Jan

Johannes Schindelin· Mar 6, 2008, 18:24 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

Hi,
On Thu, 6 Mar 2008, Jan Engelhardt wrote:
Show 10 quoted lines
> I spent the last two days writing a text-based tree visualizer; gitk is 
> really convenient, but unfortunately it needs an X display, tigs tree 
> view left me unimpressed, and I actually wanted a tool that does not 
> read all commits in like gitk/tig do, but just gives me the treeview.
> 
> Screenshot:
> http://jengelh.hopto.org/other/git-forest.png
> Program (perl):
> http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest
> Top of file contains option overview.
Nice.  Have you tested how it compares against tig (hit 'g'...)?

Ciao, Dscho

Jan Engelhardt· Mar 6, 2008, 18:49 UTC · re: Johannes Schindelin · lore

Re: [announce] text-based tree visualizer

On Mar 6 2008 19:24, Johannes Schindelin wrote:
Show 14 quoted lines
>On Thu, 6 Mar 2008, Jan Engelhardt wrote:
>
>> I spent the last two days writing a text-based tree visualizer; gitk is 
>> really convenient, but unfortunately it needs an X display, tigs tree 
>> view left me unimpressed, and I actually wanted a tool that does not 
>> read all commits in like gitk/tig do, but just gives me the treeview.
>> 
>> Screenshot:
>> http://jengelh.hopto.org/other/git-forest.png
>> Program (perl):
>> http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest
>> Top of file contains option overview.
>
>Nice.  Have you tested how it compares against tig (hit 'g'...)?
Yes, see above? :-) "tig's treeview" - that meant the 'g' key.

It just uses boring ascii, fails to display octopus merges and 'octoups branching', is limited to 'one branch' (e.g. no apparent way to pass --all to git-log/git-rev-list).

Johannes Schindelin· Mar 6, 2008, 19:46 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

Hi,
On Thu, 6 Mar 2008, Jan Engelhardt wrote:
Show 19 quoted lines
> 
> On Mar 6 2008 19:24, Johannes Schindelin wrote:
> >On Thu, 6 Mar 2008, Jan Engelhardt wrote:
> >
> >> I spent the last two days writing a text-based tree visualizer; gitk 
> >> is really convenient, but unfortunately it needs an X display, tigs 
> >> tree view left me unimpressed, and I actually wanted a tool that does 
> >> not read all commits in like gitk/tig do, but just gives me the 
> >> treeview.
> >> 
> >> Screenshot:
> >> http://jengelh.hopto.org/other/git-forest.png
> >> Program (perl):
> >> http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest
> >> Top of file contains option overview.
> >
> >Nice.  Have you tested how it compares against tig (hit 'g'...)?
> 
> Yes, see above? :-) "tig's treeview" - that meant the 'g' key.
Yes, I saw that, thank you.
> It just uses boring ascii, fails to display octopus merges and 'octoups 
> branching', is limited to 'one branch' (e.g. no apparent way to pass 
> --all to git-log/git-rev-list).
That was what I was interested in.

Thank you, Dscho

Jonas Fonseca· Mar 6, 2008, 20:46 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

On Thu, Mar 6, 2008 at 7:49 PM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
Show 13 quoted lines
>  On Mar 6 2008 19:24, Johannes Schindelin wrote:
>  >On Thu, 6 Mar 2008, Jan Engelhardt wrote:
>  >
>  >> I spent the last two days writing a text-based tree visualizer; gitk is
>  >> really convenient, but unfortunately it needs an X display, tigs tree
>  >> view left me unimpressed, and I actually wanted a tool that does not
>  >> read all commits in like gitk/tig do, but just gives me the treeview.
>  >>
>  >> Screenshot:
>  >> http://jengelh.hopto.org/other/git-forest.png
>  >> Program (perl):
>  >> http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest
>  >> Top of file contains option overview.
It looks very interesting and inspiring.
Show 5 quoted lines
>  Yes, see above? :-) "tig's treeview" - that meant the 'g' key.
>
>  It just uses boring ascii, fails to display octopus merges and
>  'octoups branching', is limited to 'one branch' (e.g. no apparent way
>  to pass --all to git-log/git-rev-list).

I agree to tig's revision graph renderer being boring and very limited. As for passing --all you need to first pass --:

  $ tig -- --all --not pu
I am planning to change this awkwardness after next release.
-- 
Jonas Fonseca
David Brown· Mar 6, 2008, 20:14 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

On Thu, Mar 06, 2008 at 06:48:19PM +0100, Jan Engelhardt wrote:
>Program (perl):
>http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest
>Top of file contains option overview.

Do you have a git URL instead of just a link to a single version of a single file? I haven't been able to figure one out.

Thanks, David

Jan Engelhardt· Mar 6, 2008, 20:38 UTC · re: David Brown · lore

Re: [announce] text-based tree visualizer

On Mar 6 2008 12:14, David Brown wrote:
Show 8 quoted lines
> On Thu, Mar 06, 2008 at 06:48:19PM +0100, Jan Engelhardt wrote:
>
>> Program (perl):
>> http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest
>> Top of file contains option overview.
>
> Do you have a git URL instead of just a link to a single version of a
> single file?  I haven't been able to figure one out.
No problem; git://dev.computergmbh.de/hxtools .

Any idea how I can make gitweb display an URL text like it does on http://git.kernel.org/?p=git/git.git;a=summary ?

Miklos Vajna· Mar 7, 2008, 00:46 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

On Thu, Mar 06, 2008 at 09:38:11PM +0100, Jan Engelhardt <jengelh@computergmbh.de> wrote:
> Any idea how I can make gitweb display an URL text like it does on
> http://git.kernel.org/?p=git/git.git;a=summary ?
use the cloneurl file (just like description) for example.
Jakub Narebski· Mar 7, 2008, 13:45 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

Jan Engelhardt <jengelh@computergmbh.de> writes:
Show 14 quoted lines
> On Mar 6 2008 12:14, David Brown wrote:
>> On Thu, Mar 06, 2008 at 06:48:19PM +0100, Jan Engelhardt wrote:
>>
>>> Program (perl):
>>> http://dev.computergmbh.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest
>>> Top of file contains option overview.
>>
>> Do you have a git URL instead of just a link to a single version of a
>> single file?  I haven't been able to figure one out.
> 
> No problem; git://dev.computergmbh.de/hxtools .
> 
> Any idea how I can make gitweb display an URL text like it does on
> http://git.kernel.org/?p=git/git.git;a=summary ?
Please read gitweb/README and gitweb/INSTALL.
>From gitweb/README:
 * GITWEB_BASE_URL
   Git base URLs used for URL to where fetch project from, i.e. full
   URL is "$git_base_url/$project".  Shown on projects summary page.
   Repository URL for project can be also configured per repository; this
   takes precendence over URL composed from base URL and project name.
   Note that you can setup multiple base URLs (for example one for
   git:// protocol access, one for http:// access) from gitweb config
   file.  [No default]
[...]
 * @git_base_url_list
   List of git base URLs used for URL to where fetch project from, shown
   in project summary page.  Full URL is "$git_base_url/$project".
   You can setup multiple base URLs (for example one for  git:// protocol
   access, and one for http:// "dumb" protocol access).  Note that per
   repository configuration in 'cloneurl' file, or as values of gitweb.url
   project config.
[...]
 * cloneurl (or multiple-valued gitweb.url)
   File with repository URL (used for clone and fetch), one per line.
   Displayed in the project summary page. You can use multiple-valued
   gitweb.url repository configuration variable for that, but the file
   takes precendence.
P.S. Will you add short info about your tool to the GitWiki page
     http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
     (somewhere along gitk and tig, in "History Viewers..." section)?
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Jan Engelhardt· Mar 8, 2008, 15:01 UTC · re: Jakub Narebski · lore

Re: [announce] text-based tree visualizer

On Mar 7 2008 05:45, Jakub Narebski wrote:
>
>P.S. Will you add short info about your tool to the GitWiki page
>     http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
>     (somewhere along gitk and tig, in "History Viewers..." section)?

Someone else already did by now (that was you, was not it :-) — would it be possible to just merge the tiny tool into contrib/ so the file does not stand alone?

thanks, Jan

Jakub Narebski· Mar 9, 2008, 12:36 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

On Sat, 8 Mar 2008, Jan Engelhardt wrote:
> 
> would it be possible to just merge the tiny tool into contrib/
> so the file does not stand alone?

I think it would be posible. Simply send a patch adding it somewhere in the contrib/ directory.

-- 
Jakub Narebski
Poland
Ping Yin· Mar 17, 2008, 13:40 UTC · re: Jan Engelhardt · lore

Re: [announce] text-based tree visualizer

On Fri, Mar 7, 2008 at 1:48 AM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
Show 9 quoted lines
> Hello everyone,
>
>
>  I spent the last two days writing a text-based tree visualizer;
>  gitk is really convenient, but unfortunately it needs an X display,
>  tigs tree view left me unimpressed, and I actually wanted a tool
>  that does not read all commits in like gitk/tig do, but just gives me
>  the treeview.
>

Here is my view ║ ║ ║ ╟ Merge branch 'jk/portable' ║ ║ ║ ╠═╗ ║ ║ ║ ╟ ║ Merge branch 'py/submodule' ║ ║ ║ ╠═╬═╗ ║ ║ ║ ╟ ║ ║ Merge branch 'db/diff-to-fp' ║ ║ ║ ╠═╬═╬═╗ ║ ║ ║ ╟ ║ ║ ║ Merge branch 'cc/help' ║ ║ ║ ╠═╬═╬═╬═╗ ║ ║ ║ ╟ ║ ║ ║ ║ shortlog: do not require to ║ ║ ║ ╟ ║ ║ ║ ║ Merge branch 'maint' ║ ║ ║ ╠═╬═╬═╬═╬═╗

It seems messed up.
-- 
Ping Yin
Jan Engelhardt· Mar 17, 2008, 16:27 UTC · re: Ping Yin · lore

Re: text-based tree visualizer

On Mar 17 2008 21:40, Ping Yin wrote:
Show 21 quoted lines
>>
>>  I spent the last two days writing a text-based tree visualizer;
>>  gitk is really convenient, but unfortunately it needs an X display,
>>  tigs tree view left me unimpressed, and I actually wanted a tool
>>  that does not read all commits in like gitk/tig do, but just gives me
>>  the treeview.
>>
>Here is my view
>║ ║ ║ ╟ Merge branch 'jk/portable'
>║ ║ ║ ╠═╗
>║ ║ ║ ╟ ║ Merge branch 'py/submodule'
>║ ║ ║ ╠═╬═╗
>║ ║ ║ ╟ ║ ║ Merge branch 'db/diff-to-fp'
>║ ║ ║ ╠═╬═╬═╗
>║ ║ ║ ╟ ║ ║ ║ Merge branch 'cc/help'
>║ ║ ║ ╠═╬═╬═╬═╗
>║ ║ ║ ╟ ║ ║ ║ ║ shortlog: do not require to
>║ ║ ║ ╟ ║ ║ ║ ║ Merge branch 'maint'
>║ ║ ║ ╠═╬═╬═╬═╬═╗
>
>It seems messed up.

It looks pretty normal. Once a vine-branch (║) branches off [a merge is done in history], it stays in its column for the entire time. It is different from gitk which moves branches to the left/right so that there are less crossovers (╬) in gitk. But in git-forest that is intentional. Also note that ╬ is not a "go-everywhere" intersection -- see the top of the git-forest script and/or try --style=3 or =0 option to make it apparent:

│ ├ │ │ │ │ │ │ │ │ Merge branch 'jk/portable' │ ╞═╪═╪═╪═╪═╪═╪═╕ │ │ │ ├ │ │ │ │ │ │ │ │ │ Merge branch 'py/submodule' │ ╞═╪═╪═╪═╪═╪═╪═╪═╕ │ │ │ ├ │ │ │ │ │ │ │ │ │ │ Merge branch 'db/diff-to-fp' │ ╞═╪═╪═╪═╪═╪═╪═╪═╪═╕ │ │ │ ├ │ │ │ │ │ │ │ │ │ │ │ Merge branch 'cc/help' │ ╞═╪═╪═╪═╪═╪═╪═╪═╪═╪═╕ │ │ │ ├ │ │ │ │ │ │ │ │ │ │ │ │ shortlog: do not require to run from inside a git re

Or was it something else you meant to describe with being messed up?
Ping Yin· Mar 18, 2008, 00:26 UTC · re: Jan Engelhardt · lore

Re: text-based tree visualizer

On Tue, Mar 18, 2008 at 12:27 AM, Jan Engelhardt <jengelh@computergmbh.de> wrote:

Show 46 quoted lines
>
>  On Mar 17 2008 21:40, Ping Yin wrote:
>  >>
>  >>  I spent the last two days writing a text-based tree visualizer;
>  >>  gitk is really convenient, but unfortunately it needs an X display,
>  >>  tigs tree view left me unimpressed, and I actually wanted a tool
>  >>  that does not read all commits in like gitk/tig do, but just gives me
>  >>  the treeview.
>  >>
>  >Here is my view
>  >║ ║ ║ ╟ Merge branch 'jk/portable'
>  >║ ║ ║ ╠═╗
>  >║ ║ ║ ╟ ║ Merge branch 'py/submodule'
>  >║ ║ ║ ╠═╬═╗
>  >║ ║ ║ ╟ ║ ║ Merge branch 'db/diff-to-fp'
>  >║ ║ ║ ╠═╬═╬═╗
>  >║ ║ ║ ╟ ║ ║ ║ Merge branch 'cc/help'
>  >║ ║ ║ ╠═╬═╬═╬═╗
>  >║ ║ ║ ╟ ║ ║ ║ ║ shortlog: do not require to
>  >║ ║ ║ ╟ ║ ║ ║ ║ Merge branch 'maint'
>  >║ ║ ║ ╠═╬═╬═╬═╬═╗
>  >
>  >It seems messed up.
>
>  It looks pretty normal. Once a vine-branch (║) branches off [a merge is
>  done in history], it stays in its column for the entire time. It is
>  different from gitk which moves branches to the left/right so that
>  there are less crossovers (╬) in gitk. But in git-forest that is
>  intentional.
>  Also note that ╬ is not a "go-everywhere" intersection --
>  see the top of the git-forest script and/or try --style=3 or =0
>  option to make it apparent:
>
>  │ ├ │ │ │ │ │ │         │ │ Merge branch 'jk/portable'
>
> │ ╞═╪═╪═╪═╪═╪═╪═╕       │ │
>  │ ├ │ │ │ │ │ │ │       │ │ Merge branch 'py/submodule'
>  │ ╞═╪═╪═╪═╪═╪═╪═╪═╕     │ │
>  │ ├ │ │ │ │ │ │ │ │     │ │ Merge branch 'db/diff-to-fp'
>  │ ╞═╪═╪═╪═╪═╪═╪═╪═╪═╕   │ │
>  │ ├ │ │ │ │ │ │ │ │ │   │ │ Merge branch 'cc/help'
>  │ ╞═╪═╪═╪═╪═╪═╪═╪═╪═╪═╕ │ │
>  │ ├ │ │ │ │ │ │ │ │ │ │ │ │ shortlog: do not require to run from inside a git re
>
>  Or was it something else you meant to describe with being messed up?
>
Thanks. That's it. I thought the normal looking would be

║ ║ ║ ╟ Merge branch 'jk/portable' ║ ║ ║ ╠═╗ ║ ║ ║ ╟ ║ Merge branch 'py/submodule' ║ ║ ║ ╠═╬═╗ ║ ║ ║ ╟ ║ ║ Merge branch 'db/diff-to-fp' ║ ║ ║ ╠═╬═╬═╗ ║ ║ ║ ╟ ║ ║ ║ Merge branch 'cc/help' ║ ║ ║ ╠═╬═╬═╬═╗ ║ ║ ║ ╟ ║ ║ ║ ║ shortlog: do not require to ║ ║ ║ ╟ ║ ║ ║ ║ Merge branch 'maint' ║ ║ ║ ╠═╬═╬═╬═╬═╗

-- 
Ping Yin
Jan Engelhardt· Mar 18, 2008, 02:08 UTC · re: Ping Yin · lore

Re: text-based tree visualizer

On Mar 18 2008 08:26, Ping Yin wrote:
Show 41 quoted lines
>>  >Here is my view
>>  >║ ║ ║ ╟ Merge branch 'jk/portable'
>>  >║ ║ ║ ╠═╗
>>  >║ ║ ║ ╟ ║ Merge branch 'py/submodule'
>>  >║ ║ ║ ╠═╬═╗
>>  >║ ║ ║ ╟ ║ ║ Merge branch 'db/diff-to-fp'
>>  >║ ║ ║ ╠═╬═╬═╗
>>  >║ ║ ║ ╟ ║ ║ ║ Merge branch 'cc/help'
>>  >║ ║ ║ ╠═╬═╬═╬═╗
>>  >║ ║ ║ ╟ ║ ║ ║ ║ shortlog: do not require to
>>  >║ ║ ║ ╟ ║ ║ ║ ║ Merge branch 'maint'
>>  >║ ║ ║ ╠═╬═╬═╬═╬═╗
>>  >
>>  >It seems messed up.
>>
>>  │ ├ │ │ │ │ │ │         │ │ Merge branch 'jk/portable'
>>
>> │ ╞═╪═╪═╪═╪═╪═╪═╕       │ │
>>  │ ├ │ │ │ │ │ │ │       │ │ Merge branch 'py/submodule'
>>  │ ╞═╪═╪═╪═╪═╪═╪═╪═╕     │ │
>>  │ ├ │ │ │ │ │ │ │ │     │ │ Merge branch 'db/diff-to-fp'
>>  │ ╞═╪═╪═╪═╪═╪═╪═╪═╪═╕   │ │
>>  │ ├ │ │ │ │ │ │ │ │ │   │ │ Merge branch 'cc/help'
>>  │ ╞═╪═╪═╪═╪═╪═╪═╪═╪═╪═╕ │ │
>>  │ ├ │ │ │ │ │ │ │ │ │ │ │ │ shortlog: do not require to run from inside a git re
>>
>>  Or was it something else you meant to describe with being messed up?
>>
>Thanks. That's it. I thought the normal looking would be
>
>║ ║ ║ ╟ Merge branch 'jk/portable'
>║ ║ ║ ╠═╗
>║ ║ ║ ╟  ║ Merge branch 'py/submodule'
>║ ║ ║ ╠═╬═╗
>║ ║ ║ ╟  ║  ║ Merge branch 'db/diff-to-fp'
>║ ║ ║ ╠═╬═╬═╗
>║ ║ ║ ╟  ║  ║  ║ Merge branch 'cc/help'
>║ ║ ║ ╠═╬═╬═╬═╗
>║ ║ ║ ╟  ║  ║  ║   ║ shortlog: do not require to
>║ ║ ║ ╟  ║  ║  ║   ║ Merge branch 'maint'
>║ ║ ║ ╠═╬═╬═╬═╬═╗

git-forest relies on having a font with fixed-size cells. xterm works (uses bitmap fonts, so no problem) works, as does sakura (uses ttf, but fixed cells).

← back to recent threads