threads / bug / 20006

minor git-svn bug

Subject: minor git-svn bug

## tl;dr

2 messages between Jul 2, 2009 and Jul 3, 2009.

replies: 1people: 2as markdown or json

doki_pen· Jul 2, 2009, 17:16 UTC · lore

Is this the right place to bring up bugs? Or only patches? Anyway, I found a small bug.

Due to some strange structure on the svn host, I have manually added the fetch lines to the [svn-remote] section of config. There are hundreds of branches and tags, so I only have lines for what I need. I removed one that I thought I didn't need anymore, and also removed the remote tracking branch. When I discovered that I needed the branch again, I added it back to svn-remotes and did a git svn fetch. There were no new commits on the branch, so the remote tracking branch was not recreated. The work around was to do a commit on the branch via svn, then git svn fetch. This caused the remote tracking branch to reappear.

Eric Wong· Jul 3, 2009, 06:24 UTC · re: doki_pen · lore

Re: minor git-svn bug

doki_pen <doki_pen@doki-pen.org> wrote:
> Is this the right place to bring up bugs?  Or only patches?  Anyway, I  
> found a small bug.

Yes to both. Also, feel free to Cc: me on git svn questions since it halves the chance of me losing track of it.

Show 9 quoted lines
> Due to some strange structure on the svn host, I have manually added the  
> fetch lines to the [svn-remote] section of config.  There are hundreds  
> of branches and tags, so I only have lines for what I need.  I removed  
> one that I thought I didn't need anymore, and also removed the remote  
> tracking branch.  When I discovered that I needed the branch again, I  
> added it back to svn-remotes and did a git svn fetch.  There were no new  
> commits on the branch, so the remote tracking branch was not recreated.   
> The work around was to do a commit on the branch via svn, then git svn  
> fetch.  This caused the remote tracking branch to reappear. --

If you have reflogs (on by default), then it would've been possible to recreate the ref without hitting the network at all by creating the ref based on the reflog.

git svn not detecting that a remote ref was manually removed was probably caused by lingering metadata in .git/svn/$remote_branch/. Clobbering that directory alone should've been sufficient for "git svn fetch" to work...

-- 
Eric Wong

← back to recent threads