albfan / git-graph

GNU General Public License v3.0
3 stars 2 forks source link

using gitgraph.js #7

Open albfan opened 7 years ago

albfan commented 7 years ago

Use a modern library to render repo. Maybe it can be integrated changing implementation to node.js as in https://github.com/a11n/RedmineCLI

albfan commented 7 years ago

About visual changes needed, it should change from show branch inside [] to use same as git log. e.g from my git-graph repo (but that could be a formatter abstraction to allow others to use different formats:

$ git log --graph --color --all --decorate
*   6355593 (HEAD -> master, origin/master, origin/HEAD) Merge pull request #3 from alexandre-mbm/master
|\  
| * c5a4d48 LICENSE
|/  
* 12f9015 better help description
* 77920e9 project description
* c9c456a remove output file
* 51aceb8 (foo) remove intermediate files
* 4c21bfb configurable viewer
* 928da92 whitespace changes
* bb687b8 standardize script
* b61f488 convert in script alias
* 04b8231 Initial import

Example to format to see authors

$ git log --graph --color --all --decorate --format=fuller
*   commit 6355593 (HEAD -> master, origin/master, origin/HEAD)
|\  Merge: 12f9015 c5a4d48
| | Author:     Alberto Fanjul 
| | AuthorDate: Sat Aug 27 11:43:45 2016 +0200
| | Commit:     GitHub 
| | CommitDate: Sat Aug 27 11:43:45 2016 +0200
| | 
| |     Merge pull request #3 from alexandre-mbm/master
| |     
| |     Adding LICENSE
| |   
| * commit c5a4d48
|/  Author:     Alexandre Magno 
|   AuthorDate: Sat Mar 14 09:12:50 2015 -0300
|   Commit:     Alexandre Magno 
|   CommitDate: Sat Mar 14 09:12:50 2015 -0300
|   
|       LICENSE
|  
* commit 12f9015
albfan commented 7 years ago

Use jsfiddle for quick and dirty

http://jsfiddle.net/fracz/guan1oz1/374/