4

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?

digitalsky
  • 379
  • 4
  • 14

1 Answers1

4

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 2
    Hmm. I'm looking at linux kernel git and I've done a lot of merges, but all the triangles are pointing right. – digitalsky Sep 10 '11 at 01:54
  • 11 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. – Dmitry Avtonomov Dec 08 '22 at 19:40
  • 1
    @DmitryAvtonomov Thank you for this feedback. I have included your comment in the answer for more visibility. – VonC Dec 08 '22 at 20:09