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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: add key to toggle between author and committer
To:
Omar Polo <op@omarpolo.com>
Cc:
Mark Jamsek <mark@jamsek.com>, gameoftrees@openbsd.org
Date:
Tue, 19 Jul 2022 10:14:35 +0200

Download raw body.

Thread
On Tue, Jul 19, 2022 at 09:47:52AM +0200, Omar Polo wrote:
> diff refs/heads/main refs/heads/togauthor
> commit - d2587c5f95c6edb51ccc8d4abfac838b58f3a463
> commit + c3a2f478b19ac60211c983ef4245d82e49e461d8
> blob - 4ec26b8962b911a5c478faf7aebc3d0686931d6e
> blob + 5b14298225faae01d45c27c546da03a458a7b9fd
> --- tog/tog.1
> +++ tog/tog.1
> @@ -214,6 +214,8 @@ view listing all references in the repository.
>  This can then be used to open a new
>  .Cm log
>  view for arbitrary branches and tags.
> +.It Cm C
> +Switch between showing the author and the committer.

Documentation is a bit sparse, but please go ahead and I'll
try to fix it up later.

>  The options for
> blob - 97ac0690a9232815bb10bc4a237246e2ec53e069
> blob + 4e852dea1423813614fd412bb96730341ea37f1d
> --- tog/tog.c
> +++ tog/tog.c
> @@ -137,6 +137,7 @@ STAILQ_HEAD(tog_colors, tog_color);
>  static struct got_reflist_head tog_refs = TAILQ_HEAD_INITIALIZER(tog_refs);
>  static struct got_reflist_object_id_map *tog_refs_idmap;
>  static enum got_diff_algorithm tog_diff_algo = GOT_DIFF_ALGORITHM_MYERS;
> +static int tog_show_committer;

Do you have plans to make this toggle visible to any other view types?
If not, could this not be stored in struct tog_log_view state instead of
adding a global? I am just trying to prevent us from ending up with lots
of global toggles because that makes it harder for readers of the code
to figure out which views are using a given toggle.