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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: diff local worktree changes
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Tue, 30 Aug 2022 12:03:03 +0200

Download raw body.

Thread
On Fri, Aug 26, 2022 at 01:42:46AM +1000, Mark Jamsek wrote:
> The below diff enables diffing local changes in the work tree. I've
> just copied the `got diff` interface. I think this is good because it
> makes the UI consistent, which makes sense imo. Now we can view changes
> in the work tree with:
> 
>   tog diff [path ...]

I am feeling a bit ambivalent about this.

(Below, I am not trying to suggest that you or anyone else should do
extra work. I am just thinking about what this feature implies for
Got's high-level design as a toolkit.)

On the one hand, I understand the convenience of an interactive diff
viewer.

On the other hand, I wonder if this is going to change people's expectations
of the tool, slowly morphing tog from a read-only repository-browser into a
small mini-IDE? Because once we are including the work tree in the scope of
tog, people may well expect more work-tree-related commands/views, such as
'tog status', 'tog commit', 'tog branch', 'tog add', 'tog remove',
'tog revert', ... until it becomes an ncurses-equivalent to the got CLI.

Is this a direction we really want to take? Heading into this direction would
duplicate a lot of effort reimplementing UI which already exists as a CLI.
Such effort could instead be spent on other areas where Got needs to improve.
Granted, the end result of fleshing out tog in this way could be really nice
if it is done well and consistently.

Is this the direction where adding this feature would take us eventually?
Or is this this really only about diffing changes in the work tree, and then
we are done?