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

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: got log and subdirectories?
To:
gameoftrees@openbsd.org
Date:
Sat, 22 Feb 2020 19:55:52 +0100

Download raw body.

Thread
Stefan Sperling:

> The thing to keep in mind is that you can use tab-completion to get
> the log of any file or directory, if you are in a work tree.
> Commands such as this do work: cd tog/; got log ../got/got.c
> 
> I think what we need to do here is expand the documentation as follows:

Hmm...

> --- got/got.1
> +++ got/got.1
> @@ -330,6 +330,11 @@ Display history of a repository.
>  If a
>  .Ar path
>  is specified, show only commits which modified this path.
> +If invoked in a work tree, the
> +.Ar path
> +is interpreted relative to the current working directory,
> +and the work tree's path prefix is implicitly prepended.
> +Otherwise, the path is interpreted relative to the repository root.

I wonder to how many other commands that description would need to
be copied.  got diff, for one.

And I just noticed that inside a work tree, "got tree" behaves like
"tog tree .", and "tog tree" like "got tree /".

My head is spinning.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de