Commit Briefs

a40de2c0cd Thomas Adam

WIP (ta/cc-pages)


4c63d3a5b7 Thomas Adam

only fetch the work tree's branch by default if it is inside "refs/heads/"

ok jamsek


84073f62fd Thomas Adam

got: use intermediate pointers to plug leak on realloc

And save worktree_branch_len for reuse. ok stsp@ and op@


a6d87ea2fa Thomas Adam

nix unnecessary colon in gotd log output

ok op@


9d0a7ee351 Thomas Adam

fix interaction of 'got fetch -b', got.conf, and work tree

Without branches in got.conf for a remote, and without -b/-R options, the fallback to HEAD would only work when not invoked in a work tree. With this fix 'got fetch' should behave as described in the man page. The -b option now overrides both got.conf and the fallback to the work tree's branch. And fallback to HEAD works as expected when invoked in a repository. Also, do not strictly require remote repositories to provide a branch from the refs/heads/ namespace. In such cases users should be able to use -R to select something to fetch. ok jamsek


3c8e3a64b0 Thomas Adam

hide unexpected diff output from xfail test


8682db42e0 Thomas Adam

add xfail test for 'got status' ignore patterns with a trailing slash

Patch by Lucas


e012cf94a2 Thomas Adam

make 'got import' -I option match directory names with a trailing slash

reported by Lucas on IRC, who sent a patch which this commit was based on ok jamsek


01a217a7bc Thomas Adam

fix gotd build

Add missing srcs and update got_repo_read_gitconfig() to be consistent with recent changes. ok stsp@


8d0dceb3d7 Thomas Adam

improve 'got fetch' behaviour when work tree's branch is not on server

Only fetch the work tree's branch if the -b option is not specified. This keeps -b functional as an override when invoked in a work tree. Our previous changes did not consider that got.conf is also a source of lists of branches to fetch, and that -b is supposed to work as an override of any default behaviour. We were implicitly appending the work tree's branch as if it was mentioned as an override on the command line, which was wrong and based on a misunderstanding of the intended behaviour. Without -b on the command line we obtain a list of branches to fetch from got.conf and use this list if it is not empty. The repository's HEAD will be fetched only if neither the -b option, nor got.conf, nor a work tree tell us what to fetch. Make the man page more clear by moving the explanation of the default behaviour into the main section of 'got fetch', leaving the -a and -b option descriptions free of such details. ok jamsek


Branches

Tags

Tree

.cirrus.ymlcommits | blame
.github/
.gitignorecommits | blame
CHANGELOGcommits | blame
CHANGEScommits | blame
LICENCEcommits | blame
Makefile.amcommits | blame
Makefile.common.incommits | blame
Makefile.inccommits | blame
READMEcommits | blame
README.portablecommits | blame
TODOcommits | blame
autogen.sh*commits | blame
compat/
configure.accommits | blame
got/
got-dist.txtcommits | blame
got-version.mkcommits | blame
gotadmin/
gotctl/
gotd/
gotsh/
gotwebd/
include/
lib/
libexec/
maintscripts/
regress/
template/
tog/
util/

README

Game of Trees (Got) is a version control system which prioritizes ease
of use and simplicity over flexibility (https://gameoftrees.org)

Got is still under development; it is being developed exclusively
on OpenBSD and its target audience are OpenBSD developers. Got is
ISC-licensed and was designed with pledge(2) and unveil(2) in mind.

Got uses Git repositories to store versioned data. At present, Got
supports local version control operations only. Git can be used
for any functionality which has not yet been implemented in Got.
It will always remain possible to work with both Got and Git on
the same repository.

To compile the Got client tool suite on OpenBSD, run:

 $ make obj
 $ make
 $ make install

This will install the following commands:

 got, the command line interface
 tog, an ncurses-based interactive Git repository browser
 several helper programs from the libexec directory
 man pages (only installed if building sources from a Got release tarball)

A Got release tarball will install files under /usr/local by default.
A build started in Got's Git repository will install files under ~/bin.

Tests will pass only after 'make install' because they rely on installed
binaries in $PATH. Tests in the cmdline directory currently depend on git(1).
Tests which use the got clone, fetch, and send commands will fail if
'ssh 127.0.0.1' does not succeed non-interactively.

 $ doas pkg_add git
 $ make regress

To test with packed repositories, run:

 $ make regress GOT_TEST_PACK=1

Because got unveils the /tmp directory by default using the /tmp directory
for test data can hide bugs. However, /tmp remains the default because
there is no better alternative that works out of the box. In order to
store test data in a directory other than /tmp, such as ~/got-test, run:

 $ mkdir ~/got-test
 $ make regress GOT_TEST_ROOT=~/got-test

Man page files in the Got source tree can be viewed with 'man -l':

 $ man -l got/got.1
 $ man -l got/git-repository.5
 $ man -l got/got-worktree.5
 $ man -l tog/tog.1

EXAMPLES in got.1 contains a quick-start guide for OpenBSD developers.


To compile the Got server tool suite on OpenBSD, run:

 $ make obj
 $ make server
 $ make server-install

This will install the following commands:

 gotd, the repository server program
 gotctl, the server control utility
 gotsh, the login shell for users accessing the server via the network

See the following manual page files for information about server setup:

 $ man -l gotd/gotd.8
 $ man -l gotd/gotd.conf.5
 $ man -l gotctl/gotctl.8
 $ man -l gotsh/gotsh.1

See regress/gotd/README for information about running the server test suite.


Game of Trees Web Daemon (gotwebd) is a FastCGI program which displays
repository data and is designed to work with httpd(8).

To compile gotwebd on OpenBSD, run:

 $ make webd
 # make webd-install

This will create the following files:
  the daemon program /usr/local/sbin/gotwebd
  css and image files in /var/www/htdocs/gotwebd
  the gotwebd init script in /etc/rc.d
  man pages (only installed if building sources from a Got release tarball)

Documentation is available in manual pages:

 $ man -l gotwebd/gotwebd.8
 $ man -l gotwebd/gotwebd.conf.5


Got can be built with profiling enabled to debug performance issues.
Note that profiled builds cannot make use of pledge(2).
Profiling should only be enabled for one program at a time. Otherwise,
multiple programs will attempt to write to the 'gmon.out' file in the
current working directory.

For example, to compile got-read-pack with profiling enabled:

  $ cd libexec/got-read-pack
  $ make clean
  $ make PROFILE=1
  $ make install

Running any Got command which ends up using got-read-pack should now
produce the file 'gmon.out' in the current working directory.
The gprof2dot program can be used to generate a profile graph:

  $ doas pkg_add gprof2dot graphviz
  $ gprof ~/bin/got-read-pack gmon.out | gprof2dot | dot -T png > profile.png


Guidelines for reporting problems:

All problem/bug reports should include a reproduction recipe in form of a
shell script which starts out with an empty repository and runs a series of
Got and/or Git commands to trigger the problem, be it a crash or some other
undesirable behaviour.

The regress/cmdline directory contains plenty of example scripts.
An ideal reproduction recipe is written as an xfail ("expected failure")
regression test. For a real-world example of an xfail test, see commits
4866d0842a2b34812818685aaa31d3e0a966412d and
2b496619daecc1f25b1bc0c53e01685030dc2c74 in Got's history.

Please take this request very seriously; Ask for help with writing your
regression test before asking for your problem to be fixed. Time invested
in writing a regression test saves time wasted on back-and-forth discussion
about how the problem can be reproduced. A regression test will need to be
written in any case to verify a fix and prevent the problem from resurfacing.

It is also possible to write test cases in C. Various examples of this
exist in the regress/ directory. Most such tests are unit tests; it is
unlikely that a problem found during regular usage will require a test
to be written in C.

Some areas of code, such as the tog UI, are not covered by automated tests.
Please always try to find a way to trigger your problem via the command line
interface before reporting a problem without a written test case included.
If writing an automated test really turns out to be impossible, please
explain in very clear terms how the problem can be reproduced.

Mail problem reports to: gameoftrees@openbsd.org


Guidelines for submitting patches:

Mail patches to: gameoftrees@openbsd.org
Pull requests via any Git hosting sites will likely be overlooked.
Please keep the intended target audience in mind when contributing to Got.


Subscribing to the gameoftrees@openbsd.org mailing list:

The mailing list is used for patch reviews, bug reports, and user questions.
To subscribe, send mail to majordomo@openbsd.org with a message body of:
subscribe gameoftrees

See https://www.openbsd.org/mail.html for more information.