在 gitk 中,“编辑 View ”(F4) 窗口中有一个名为“标记分支边”的选项。它似乎对应于 --left-right 选项:
+set known_view_options {
+ {perm b . {} {mc "Remember this view"}}
+ {args t50= + {} {mc "Commits to include (arguments to git log):"}}
+ {all b * "--all" {mc "Use all refs"}}
+ {dorder b . {"--date-order" "-d"} {mc "Strictly sort by date"}}
+ {lright b . "--left-right" {mc "Mark branch sides"}}
我能看到的唯一区别是提交由三角形而不是圆圈标记。这个选项应该做什么?
最佳答案
我想它链接到 git log或 git rev-list --左右选项:
Mark which side of a symmetric diff a commit is reachable from.
Commits from the left side are prefixed with<
and those from the right with>
(<
和 >
应该解释了 gitk 中使用的三角形)
来自 ProGit book :
A common switch to use with the log command in this case is
--left-right
, which shows you which side of the range each commit is in. This helps make the data more useful:
$ git log --left-right master...experiment
< F
< E
> D
> C
(对 seeing remote changes 有帮助)
Dmitry Avtonomov添加 the comments (十一年后):
To make "
Mark branch sides
" make any difference in gitk, you need to specify a range in text field "Additional arguments to git log
", e.g. like in VonC's example: "master...experiment
".There also need to be some commits present only on one of those specified branches.
关于linux - gitk 的 "Mark Branch Sides"选项的定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7324763/