From: Mark Jamsek Subject: Re: implement support for work tree diffs in tog To: Stefan Sperling Cc: gameoftrees@openbsd.org Date: Fri, 06 Dec 2024 14:43:37 +1100 Stefan Sperling wrote: > On Thu, Dec 05, 2024 at 05:19:02PM +0100, Stefan Sperling wrote: > > On Fri, Dec 06, 2024 at 02:32:03AM +1100, Mark Jamsek wrote: > > > The below diff introduces support for work tree diffs via the tog diff > > > CLI with `tog diff [-s] [path ...]` and the log view. > > > > I am happy with this. I will keep running with it to test it, and > > see no reason to block this diff from going in. Thanks! I'm running it locally, too, and trying to drive tog outside my usual route to find any breakage. So far, I think this will almost completely replace my use of `got diff`. > One thing which doesn't work as expected is marking some older > commit and then pressing Enter on a work tree entry. The resulting > diff view displays the work tree diff only, rather than showing the > local changes mixed with committed changes, relative to the marked commit. > > This is a limitation in Got's diff engine, since diffing work tree > state against repository state is not implemented there. It can only > diff the work tree against the index and a repository tree against > another repository tree. So there's nothing to fix in tog for now. > I wanted to mention my observation anyway. This is something for > the project's ever-growing todo list... Yes, we intentionally disallow marking work tree diffs for now for the same reason. But it's something I really want! Implementing this feature is on my todo list along with adding a new keyword to allow diffing the work tree against arbitrary commits (along with many other things :). -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68