Subject: Re: git-svn tags and branches

From: Eric Wong <[email-masked]>
Date: Thu, 30 Aug 2007 03:21:15 -0700

Giuseppe Bilotta <[email-masked]> wrote:
> Currently, git-svn imports svn tags as lightweight git tags.
> I was susprised when I discovered this (from 'git describe'
> failing and some helpful assistance on the IRC channel), so
> I'm now wondering: is there a technical reason why they
> aren't converted to annotated tags? If not, would it be
> possible to implement this in git-svn, possibly with some
> way to 'fix' existing git-svn repository?

As noted by other repliers, SVN tags can be moving targets just like
branches, and are treated as such by git-svn.

I should note that tags in git can actually be updated like a branch
just the same way, too, it's just not as easy to "accidentally" do.

So I'll add the ability to modify refs under the refs/tags/ namespace to
my git-svn TODO list (which is getting rather large).  I also plan to
support branches outside of the refs/remotes/ namespace so it's easier
to use (clone, browse from gitweb) from bare repositories.

> My second question concerns the uses of branche in git-svn,
> but it might come from a not perfect understanding of the
> branching mechanism in git (and yes, I've read the
> documentation and Wiki pages).
> 
> If I understand correctly, svn branches are imported in
> git-svn as remote branches (refs/remote/*) and are
> automatically updated on git-svn fetch or git-svn fetch-all.
> 
> In my experiments, however, I've noticed the following
> behaviour.
> 
> git branch --track trunk remote/trunk
> <do some changes and git commit them, while still on branch master>
> git svn dcommit
> 
> Now, master and remote/trunk point to the new roundtripped
> changes, but the branch 'trunk' (in git) remains pointing to
> the old remote/trunk head. I would have expected the --track
> option to keep trunk in sync with remote/trunk ...
> 
> Or am I missing something obvious?

The author of git-svn (myself) hasn't gotten around to supporting
(or even looking at) git branch --track.

Right now, dcommit only knows about HEAD and the remote it's committing
to, nothing else.  The config set by --track doesn't do anything
for git-svn.

I really have a lot of catching up to do with all the new(er) things
happening in git.  I learned git (what seems like) aeons ago have been
more or less content with what the plumbing offered back then.  The past
six months of my life hasn't exactly left me with a lot of time or
energy for git, either; hopefully I'll have more time soon...

-- 
Eric Wong