Re: git-svn producing "invalid author/committer line"
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Jul 3, 2009, 04:28 UTC
- Message-ID
- <20090703042846.GA14767@dcvr.yhbt.net>
- In-Reply-To
- <sbqo45dgejpcnt58cam2tfkeon4is2v4ur@4ax.com>
esskov@oncable.dk wrote:
Show 16 quoted lines
> Hi, > > We have an SVN repository with a number of projects in its /trunk. > Different people have r/w-access to different subsets of these projects. > > When I "git-svn fetch" this repo's trunk there will be some revisions that > I don't have access to. In SVN log they show up as empty change-sets with > unspecified author. > In the resulting git repo, git-fsck says "error in commit > 92cf6ec3a55fbbfbf5aea7f0937e4b49470b9112: invalid author/committer line", > and - as a consequence I guess - git-gc aborts. > > $ git show 92cf6 > commit 92cf6ec3a55fbbfbf5aea7f0937e4b49470b9112 > Author: (no author) <(no author)@xxxx> > Date: Thu Jan 1 00:00:00 1970 +0000
Actually, it's not the author, but the date == 0 that fsck.c has an issue with. Proposed patch to {fsck,commit}.c coming.
Show 10 quoted lines
> I tried to run "git filter-branch --prune-empty -- --all", to simply > discard these empty commits, but the problem remains. > > After some googling I found a possible work-around, using the > --authors-file option of git-svn to map the "no author" into something > less invalid, but I suppose that would require the list to contain every > other committer as well? > > Could I somehow make "git-svn fetch" skip these empty commits, > corresponding to revisions that the SVN user doesn't have access to?
You can pass '-r<begin>:<end>' in a way similar to "svn log" to skip commits:
git svn fetch -r5:200
-- Eric Wong