{"thread":{"id":"21633","subject":"how to make gitk to use specified history information","startedAt":"2009-11-16T07:51:54Z","lastAt":"2009-11-16T10:58:58Z","messageCount":4,"participants":["Liu Yubao","Eric Raible"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"127662","messageId":"4B01049A.5090402@gmail.com","threadId":"21633","inReplyTo":null,"subject":"how to make gitk to use specified history information","fromName":"Liu Yubao","fromEmail":"yubao.liu@gmail.com","sentAt":"2009-11-16T07:51:54Z","receivedAt":"2009-11-16T07:51:54Z","isPatch":false,"sender":{"key":"yubao.liu@gmail.com","avatar":null},"body":"Hi,\n\nI want to obtain an outline of history information, for example:\n\n  a - b - c - d - h -i -j\n   \\         /\n    e- f - g\n\nI simplify the graph like this:\n\n  a - c - d - j\n    \\    /\n      g\n\nThat's to say, I skip all commits that\n\n  * have only one parent, and\n  * have only one child, and\n  * its child has only one parent\n\nI checked `git help rev-list` but didn't find this feature, so I\nwrite a little script[1] to parse output of `git rev-list --parents\n--full-history --sparse --all` and get the simplified history:\nj d\nd c g\nc a\ng a\n\nNow how can I make gitk to show this simpilified history? I have tried\nGraphViz but the history information is still so large that GraphViz\ncrashes.\n\n\n[1] http://jff.googlecode.com/svn/trunk/utils/git-branch-graph.pl\n\nBest regards,\n\nLiu Yubao\n"},{"id":"127663","messageId":"loom.20091116T090441-576@post.gmane.org","threadId":"21633","inReplyTo":"4B01049A.5090402@gmail.com","subject":"Re: how to make gitk to use specified history information","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2009-11-16T08:08:30Z","receivedAt":"2009-11-16T08:08:30Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"Liu Yubao <yubao.liu <at> gmail.com> writes:\n\n> I want to obtain an outline of history information, for example:\n> \n>   a - b - c - d - h -i -j\n>    \\         /\n>     e- f - g\n> \n> I simplify the graph like this:\n> \n>   a - c - d - j\n>     \\    /\n>       g\n\n\"gitk --simplify-by-decoration\"?\n\n- Eric\n"},{"id":"127666","messageId":"4B010F91.5010208@gmail.com","threadId":"21633","inReplyTo":"loom.20091116T090441-576@post.gmane.org","subject":"Re: how to make gitk to use specified history information","fromName":"Liu Yubao","fromEmail":"yubao.liu@gmail.com","sentAt":"2009-11-16T08:38:41Z","receivedAt":"2009-11-16T08:38:41Z","isPatch":false,"sender":{"key":"yubao.liu@gmail.com","avatar":null},"body":"Eric Raible wrote:\n> Liu Yubao <yubao.liu <at> gmail.com> writes:\n> \n>> I want to obtain an outline of history information, for example:\n>>\n>>   a - b - c - d - h -i -j\n>>    \\         /\n>>     e- f - g\n>>\n>> I simplify the graph like this:\n>>\n>>   a - c - d - j\n>>     \\    /\n>>       g\n> \n> \"gitk --simplify-by-decoration\"?\n> \n> - Eric\n> \nThanks, but that gets \"a - g - j\" which isn't what I want.\n(g and j are heads of two branches).\n\nThe command sequence to produce that full revision graph:\n\n#!/bin/bash\nd=/tmp/t$$\nrm -rf $d && mkdir $d && cd $d || exit 1\n\ndoit () {\n  for s in $@; do\n    echo $s >> a.txt \n    git add a.txt\n    git commit -q -m $s\n  done\n}\n\ngit init\ndoit a b c\ngit checkout -b t HEAD~2\ndoit e f g\ngit checkout master\ngit merge t\ndoit d h i j\n\ngitk &\n"},{"id":"127672","messageId":"4B013072.5030208@gmail.com","threadId":"21633","inReplyTo":"loom.20091116T090441-576@post.gmane.org","subject":"dirty code to get an outline of commit history with gitk [Was: how to make gitk to use specified history information]","fromName":"Liu Yubao","fromEmail":"yubao.liu@gmail.com","sentAt":"2009-11-16T10:58:58Z","receivedAt":"2009-11-16T10:58:58Z","isPatch":false,"sender":{"key":"yubao.liu@gmail.com","avatar":null},"body":"Eric Raible wrote:\n> Liu Yubao <yubao.liu <at> gmail.com> writes:\n> \n>> I want to obtain an outline of history information, for example:\n>>\n>>   a - b - c - d - h -i -j\n>>    \\         /\n>>     e- f - g\n>>\n>> I simplify the graph like this:\n>>\n>>   a - c - d - j\n>>     \\    /\n>>       g\n> \n> \"gitk --simplify-by-decoration\"?\n> \n> - Eric\n> \nHi, I get a very dirty implementation, see\n\nhttp://jff.googlecode.com/svn/trunk/utils/git-branch-graph/\n\nhttp://jff.googlecode.com/files/gitk-branch-graph--all.png\nhttp://jff.googlecode.com/files/gitk--all.png\n\nThese are just to show my expectation, the code is very very very dirty,\nI hope git and gitk will add this feature in an elegant and efficent way.\n"}]}