"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
sort ENVIRONMENT entries in got.1 and tog.1
To:
gameoftrees@openbsd.org
Date:
Thu, 19 Jan 2023 18:46:00 +0100

Download raw body.

Thread
I had this sitting on a branch for some time, revamped now while doing
some cleanups.  Just as per subject: no intentional changes to the
text, just some shuffling.

i think that tog.1 in particular gains a bit from this, as it's easier
to find variables and, as an unwanted side effect of the sorting, I
think that it's more clear when reading: you have TOG_COLORS first,
then TOG_COLOR_*, TOG_DIFF_ALGORITHM and finally TOG_VIEW_SPLIT_MODE.

what do you think?  should I go on or just drop it?

Thanks,


diff /tmp/got
commit - 8fcd5cccdccdf61486b86753d28252df3bd5444a
path + /tmp/got
blob - 06f7a35a329a5563b7c304c6b2be8b38e249e518
file + got/got.1
--- got/got.1
+++ got/got.1
@@ -2999,6 +2999,14 @@ environment variable provide author information.
 nor the
 .Ev GOT_AUTHOR
 environment variable provide author information.
+.It Ev GOT_IGNORE_GITCONFIG
+If this variable is set then any remote repository definitions or author
+information found in Git configuration files will be ignored.
+.It Ev GOT_LOG_DEFAULT_LIMIT
+The default limit on the number of commits traversed by
+.Cm got log .
+If set to zero, the limit is unbounded.
+This variable will be silently ignored if it is set to a non-numeric value.
 .It Ev VISUAL , EDITOR
 The editor spawned by
 .Cm got commit ,
@@ -3011,14 +3019,6 @@ the attention it deserves.
 text editor will be spawned in order to give
 .Xr ed 1
 the attention it deserves.
-.It Ev GOT_LOG_DEFAULT_LIMIT
-The default limit on the number of commits traversed by
-.Cm got log .
-If set to zero, the limit is unbounded.
-This variable will be silently ignored if it is set to a non-numeric value.
-.It Ev GOT_IGNORE_GITCONFIG
-If this variable is set then any remote repository definitions or author
-information found in Git configuration files will be ignored.
 .El
 .Sh FILES
 .Bl -tag -width packed-refs -compact
blob - 0c91ce65953bf0d1b411b12edff380e5ef1d057e
file + tog/tog.1
--- tog/tog.1
+++ tog/tog.1
@@ -698,31 +698,6 @@ work tree, use the repository path associated with thi
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width TOG_VIEW_SPLIT_MODE
-.It Ev TOG_DIFF_ALGORITHM
-Determines the default diff algorithm used by
-.Nm .
-Supported diff algorithms are Myers (quick and dirty) and
-Patience (slow and tidy).
-Valid values for
-.Ev TOG_DIFF_ALGORITHM
-are
-.Dq patience
-and
-.Dq myers .
-If unset, the Myers diff algorithm will be used by default.
-.It Ev TOG_VIEW_SPLIT_MODE
-Determines the default layout of split-screen views.
-If set to
-.Dq h
-or
-.Dq H ,
-.Nm
-will use horizontal split by default.
-Otherwise, vertical split will be used.
-The
-.Cm S
-key can be used to switch between vertical and horizontal split layout
-at run-time.
 .It Ev TOG_COLORS
 .Nm
 shows colorized output if this variable is set to a non-empty value.
@@ -739,61 +714,48 @@ which maps to the terminal's default foreground color.
 and
 .Dq default
 which maps to the terminal's default foreground color.
-.It Ev TOG_COLOR_DIFF_MINUS
-The color used to mark up removed lines in diffs.
-If not set, the default value
-.Dq magenta
-is used.
-.It Ev TOG_COLOR_DIFF_PLUS
-The color used to mark up added lines in diffs.
-If not set, the default value
-.Dq cyan
-is used.
-.It Ev TOG_COLOR_DIFF_CHUNK_HEADER
-The color used to mark up chunk header lines in diffs.
-If not set, the default value
-.Dq yellow
-is used.
-.It Ev TOG_COLOR_DIFF_META
-The color used to mark up meta data in diffs.
-If not set, the default value
-.Dq green
-is used.
-.It Ev TOG_COLOR_TREE_SUBMODULE
-The color used to mark up submodule tree entries.
-If not set, the default value
-.Dq magenta
-is used.
-.It Ev TOG_COLOR_TREE_SYMLINK
-The color used to mark up symbolic link tree entries.
-If not set, the default value
-.Dq magenta
-is used.
-.It Ev TOG_COLOR_TREE_DIRECTORY
-The color used to mark up directory tree entries.
-If not set, the default value
-.Dq cyan
-is used.
-.It Ev TOG_COLOR_TREE_EXECUTABLE
-The color used to mark up executable file tree entries.
-If not set, the default value
-.Dq green
-is used.
-.It Ev TOG_COLOR_COMMIT
-The color used to mark up commit IDs.
-If not set, the default value
-.Dq green
-is used.
 .It Ev TOG_COLOR_AUTHOR
 The color used to mark up author information.
 If not set, the default value
 .Dq cyan
 is used.
+.It Ev TOG_COLOR_COMMIT
+The color used to mark up commit IDs.
+If not set, the default value
+.Dq green
+is used.
 .It Ev TOG_COLOR_DATE
 The color used to mark up date information.
 If not set, the default value
 .Dq yellow
 is used.
+.It Ev TOG_COLOR_DIFF_CHUNK_HEADER
+The color used to mark up chunk header lines in diffs.
+If not set, the default value
+.Dq yellow
+is used.
+.It Ev TOG_COLOR_DIFF_META
+The color used to mark up meta data in diffs.
+If not set, the default value
+.Dq green
+is used.
+.It Ev TOG_COLOR_DIFF_MINUS
+The color used to mark up removed lines in diffs.
+If not set, the default value
+.Dq magenta
+is used.
+.It Ev TOG_COLOR_DIFF_PLUS
+The color used to mark up added lines in diffs.
+If not set, the default value
+.Dq cyan
+is used.
+.It Ev TOG_COLOR_REFS_BACKUP
+The color used to mark up references in the
+.Dq refs/got/backup/
+namespace.
+If not set, the default value
+.Dq cyan
+is used.
 .It Ev TOG_COLOR_REFS_HEADS
 The color used to mark up references in the
 .Dq refs/heads/
@@ -801,13 +763,6 @@ is used.
 If not set, the default value
 .Dq green
 is used.
-.It Ev TOG_COLOR_REFS_TAGS
-The color used to mark up references in the
-.Dq refs/tags/
-namespace.
-If not set, the default value
-.Dq magenta
-is used.
 .It Ev TOG_COLOR_REFS_REMOTES
 The color used to mark up references in the
 .Dq refs/remotes/
@@ -815,13 +770,58 @@ is used.
 If not set, the default value
 .Dq yellow
 is used.
-.It Ev TOG_COLOR_REFS_BACKUP
+.It Ev TOG_COLOR_REFS_TAGS
 The color used to mark up references in the
-.Dq refs/got/backup/
+.Dq refs/tags/
 namespace.
 If not set, the default value
+.Dq magenta
+is used.
+.It Ev TOG_COLOR_TREE_DIRECTORY
+The color used to mark up directory tree entries.
+If not set, the default value
 .Dq cyan
 is used.
+.It Ev TOG_COLOR_TREE_EXECUTABLE
+The color used to mark up executable file tree entries.
+If not set, the default value
+.Dq green
+is used.
+.It Ev TOG_COLOR_TREE_SUBMODULE
+The color used to mark up submodule tree entries.
+If not set, the default value
+.Dq magenta
+is used.
+.It Ev TOG_COLOR_TREE_SYMLINK
+The color used to mark up symbolic link tree entries.
+If not set, the default value
+.Dq magenta
+is used.
+.It Ev TOG_DIFF_ALGORITHM
+Determines the default diff algorithm used by
+.Nm .
+Supported diff algorithms are Myers (quick and dirty) and
+Patience (slow and tidy).
+Valid values for
+.Ev TOG_DIFF_ALGORITHM
+are
+.Dq patience
+and
+.Dq myers .
+If unset, the Myers diff algorithm will be used by default.
+.It Ev TOG_VIEW_SPLIT_MODE
+Determines the default layout of split-screen views.
+If set to
+.Dq h
+or
+.Dq H ,
+.Nm
+will use horizontal split by default.
+Otherwise, vertical split will be used.
+The
+.Cm S
+key can be used to switch between vertical and horizontal split layout
+at run-time.
 .El
 .Sh EXIT STATUS
 .Ex -std tog