Official git export (was: Re: FreeBSD problems and preliminary ways to solve)

Jonathan Anderson jonathan.anderson at
Fri Aug 26 10:29:10 UTC 2011

On 26 August 2011 10:16, Adrian Chadd <adrian at> wrote:
> [snip]
> I've been trying to figure out how to actually _use_ git in a way that
> lets me do continuous (re)integration back from/to FreeBSD.
> Ie, being able to pull/rebase things from upstream, then push commits
> back into the tree, and then pull those back from upstream.
> There's git/SVN integration, but I've not seen examples of how it can
> be used by FreeBSD developers with SVN accounts;

The Gitorious wiki page ( claims
that git-svn can be successfully used with our SVN server with a
command like:

git svn commit-diff -m "git branch to svn" -rHEAD upstream/master
work/ hwpmc_kcachegrind

I have not tested this yet with path=/base/head, as it's release time
and I suspect that people might get rather cranky if I mess things up
too badly. I am definitely intending to test this approach once
CURRENT is unfrozen, however, and document my experiences in the wiki.

One of the downsides of using git-svn is that some things (e.g. "make
sysent") expect the $FreeBSD$ in our header files to be expanded to
something SVN-ey, but Git believes that it shouldn't munge source
code: it's an immutable blob. So, when changing syscalls, one needs to
check out syscalls.master using freebsd-subversion, copy it to the Git
repo, run "make sysent" and then finally revert syscalls.master to
what Git expects it to be (just "$FreeBSD$" at the top). There's a
viable argument to be had here as to whether this is a Git problem or
an assumption-that-the-script-makes problem, but it is a nit to be
aware of.

Jonathan Anderson

Research Student, Security Group
Computer Laboratory
University of Cambridge

+44 (1223) 763747
jonathan.anderson at

More information about the freebsd-arch mailing list