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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got log and subdirectories?
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 22 Feb 2020 17:19:48 +0100

Download raw body.

Thread
On Sat, Feb 22, 2020 at 04:29:47PM +0100, Christian Weisgerber wrote:
> When "got log" is invoked in a subdirectory of a work tree...
> 
> $ cd got/tog
> $ got log
> 
> ... is it supposed to (1) show the log for the top directory, or
> (2) treat the subdirectory as an implicit path argument and only
> show the log for this path?
> 
> Currently, it does (1).

It is supposed to do (1).

Subversion does (2) and there is an entire FAQ entry dedicated to this
because implicit "." behaviour can be very confusing.
So for got's UI I chose to make this an explicit action.

> However, when you specify an explicit path
> argument, it gets appended to the subdirectory:
> 
> $ got log tog 
> got: tog/tog: no such entry found in tree
> 
> Clearly, something isn't quite right, but I don't know what the
> "correct" behavior should be.

Yes, indeed. You have found a bug :)

> "tog log" exhibits the same behavior.

Thank you. I'll take look at fixing this.

As a workaround, this works in any subdirectory: got log .
It's what I usually do, and it works as expected.