git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-svn producing "invalid author/committer line"

From
EWEric 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
Previous: esskov@oncable.dkNext: Eric Wong
Message 2 of 4 in “git-svn producing "invalid author/committer line"”
  1. esskov@oncable.dkJul 2, 2009
  2. Eric WongJul 3, 2009
  3. Allow the Unix epoch to be a valid commit dateEric Wong, Jul 3, 2009
  4. Junio C HamanoJul 5, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.