gitk: weird history tree

前端 未结 3 1286
南旧
南旧 2021-01-05 00:32

I\'m porting an svn repo to git (using svn2git from https://www.negativetwenty.net/redmine/projects/show/svn2git) and since svn does not track merges, I need to edit .git/in

相关标签:
3条回答
  • 2021-01-05 01:04

    See how "git log" shows the branch being merged into trunk, while gitk shows trunk being merged in branch.

    That is because gitk freely reorders parents — as do many other tools. The leftmost parent is not always the 1st parent. Often tools put the parents whereever there is space. It ultimately provides for a more packed view. Compare:

    • http://i53.tinypic.com/29lfyti.png - git log makes "master" wind around the "nucrypt2" branch so that the X'th (X>=2) parent is always right of the merge
    • http://i52.tinypic.com/sc7r5v.png - git-forest, default
    • http://i51.tinypic.com/28iatjd.png - same, with merge shortcut seeking disabled

    I find git-log's graphing not very ergonomic - it takes more blank lines.

    0 讨论(0)
  • 2021-01-05 01:08

    After playing with different GUI, the behaviour really seems to be tool dependent. Saddly, not many of them are configurable...

    I prefer having a tree view of what actually happened compared to an optimized view where everything fits...

    I have settled for "gitg" (http://trac.novowork.com/gitg/). Seems relatively active, and it does exactly what I expect from the history view. Master is the left most "lane", branches are forked from it and merged into it from the right. I feel it is consistent with my workflow. Also, I can show "inactive lanes" so master is always shown and on the left-most side (enable/disable in preference window). A nice thing also is the "Show history in topological order". When checked, gitg will try to place commits on a branch together. When unchecked, they will appear in chronological order.

    It can also do basic commits and staging.

    Only drawback I can find is the search: it seems I cannot enter an sha1sum and find the right commit. Maybe just a bug.

    About the original question (can gitk be configured the way I want it?) I'm still not sure it's possible. Probably a design decision...

    0 讨论(0)
  • 2021-01-05 01:08

    If you have a github account, you could try the "Network" view on there too.

    0 讨论(0)
提交回复
热议问题