Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I recover after a checksum mismatch with 'git svn clone'?

I'm cloning an SVN repository to git as part of our migration plan. I've hit various snags along the way, forcing me to continue the clone with a git svn fetch command. The most recent failure I can't figure out how to solve:

$ git svn fetch
Checksum mismatch: dc/trunk-4632-jh/dc-smtpd/lib/Qpsmtpd/Address.pm.t 8ce3aea3f47dc115e8fe53bd62d0f074cfe93ec6
expected: 59de969022e46135fa6dc7599fc2f3b4
     got: 4334926a01c905cdb7fce71265e370c1

I found this related answer, however that solution doesn't work because git svn log is not yet functional, as the repo is not fully in place:

$ git svn log dc/trunk-4632-jh/dc-smtpd/lib/Qpsmtpd/Address.pm.t
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
log --no-color --first-parent --pretty=medium HEAD: command returned error: 128

How can I proceed?

like image 792
Flimzy Avatar asked Aug 20 '14 10:08

Flimzy


1 Answers

See also: Git svn rebase : checksum mismatch

In our case the additional treatment of the files (server-side includes in Apache) caused the checksum problem.

Disabling SSI in Apache's /etc/httpd.conf file for the period of migration by commenting out the

 AddType text/html .shtml
 AddOutputFilter INCLUDES .shtml

directives solved the problem, caused by the interpretation of .shtml files by the front-end Apache server, which produced a new content (and thus a new hash), other than the hash of the original file itself.

like image 97
Rusi Popov Avatar answered Oct 07 '22 17:10

Rusi Popov