From: Stefan Sperling Subject: Re: gotweb To: Tracey Emery Cc: gameoftrees@openbsd.org Date: Mon, 4 Nov 2019 16:52:27 +0100 On Mon, Nov 04, 2019 at 07:57:18AM -0700, Tracey Emery wrote: > On Sat, Oct 19, 2019 at 12:15:22PM +0200, Stefan Sperling wrote: > > In gw_log() you have some commented-out code for opening a worktree. > > I don't think anything from got_worktree.h should be needed for gotweb, > > since it can operate on a repository directly. If there's any functionality > > you need for reading a repository which is not available in the current set > > of APIs just let me know. > > > > Cheers! > > Greetings Stefan, > > This weekend, I was working on two more possible user scenarios for > gotweb. Currently, I've been building on top of bare git cloned repos. > Then I thought, what if a user wanted to use gotweb on actual cloned > repos or their worktrees. So, I began by detecting the existence of .got > and .git directories. > > This all works fine and dandy on git repos, but when got_repo_open > attempts to open a got repo, the "no git repository found" error is > thrown. > > So, 1) Is this where the worktree commands come into play, directly on a > got worktree, and 2) do we suppose anyone might use gotweb in this > fashion? > > Personally, I'd never keep my work repos in /var/www, but didn't know if > someone else might. 3) In the long-term plans for gotd, is that going to > work against bare repos with a got checkout process, similar to how it's > currently working with git? > > Thanks. Just didn't want to spend more time on this code path, if it's > the wrong path to go down. The work tree APIs in got_worktree.h are for Got worktrees, which store a path to a Git repository in meta data. There is nothing interesting in a work tree which gotweb could show. I think we should require users to point gotweb at an actual Git repository, and avoid trying to support got work trees (which are not "got repositories"; such a thing does not exist).