Subject: Re: Tree with leading '0' modes in 1.7.0.3

From: "Shawn O. Pearce" <[email-masked]>
Date: Fri, 26 Mar 2010 16:05:37 -0700

"Mike.lifeguard" <[email-masked]> wrote:
> Apparently Scott Chacon has some clue about this error:
> http://support.github.com/discussions/repos/2566-strange-warning-from-fsck-and-github-repo-using-too-much-diskspace
> so I've added him to CC. (Note that changing all SHA1s is not really a
> problem for us, there are only 3 copies of the repo, and the project has
> only been using version control for 2 days)

Scott, please fix that library on GitHub.  JGit's fsck has a hard
failure on these malformed trees, because the leading '0' mode
causes the tree to come up with the wrong SHA-1 hash given its
logical content.  They shouldn't be created like this.

Mike, it sounds like you might be able to fix your project by just
running something like:

  $ git filter-branch --index-filter '' --all

It rewrites the trees, which will change their SHA-1s (and the commit
SHA-1s downstream from there) with correctly formatted tree objects.

-- 
Shawn.