gitk 的“Mark Branch Sides”的定义选项

发布于 2024-12-03 14:51:44 字数 521 浏览 0 评论 0原文

在 gitk 中,“编辑视图”(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"}}

我能看到的唯一区别是提交是用三角形而不是圆圈标记的。这个选项应该做什么?

In gitk, there is an option in the "Edit View" (F4) window called "Mark branch sides". It seems to correspond to the --left-right option:

+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"}}

The only difference I can see is that the commits are marked by triangles instead of circles. What is this option supposed to do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

箹锭⒈辈孓 2024-12-10 14:51:44

我想它链接到 git loggit rev-list --left-right 选项:

标记可以从对称差异的哪一侧访问提交。
左侧的提交以 < 为前缀,右侧的提交以 >

为前缀

<>< /code> 应该解释 gitk 中使用的三角形)

来自 ProGit 书

在这种情况下,与日志命令一起使用的常见开关是--left-right,它显示每次提交位于范围的哪一侧。这有助于使数据更有用:

$ git log --left-right master...experiment
< F
< E
> D
> C

它有助于查看远程更改


Dmitry Avtonomov 添加了评论(十一年后):

要使“标记分支边”在 gitk 中产生任何差异,您需要在文本字段“git log 的附加参数”中指定范围,例如VonC 的示例:“master...experiment”。

还需要仅在这些指定分支之一上存在一些提交。

I suppose it is linked to the git log or git rev-list --left-right option:

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 >

(the < and > should explain the triangles used in gitk)

From 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

(It helps for seeing remote changes)


Dmitry Avtonomov adds in the comments (eleven years later):

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文