Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-svn clone file integrity

I am responsible for moving some projects from a svn repository to git. I found out the workflow is fairly easy, its not more than a simple

git svn clone --stdlayout <svn-repo> <git-repo>
cd <git-repo>
java -jar ~/svn-migration-scripts.jar clean-git --force

The svn-migration-scripts.jar can be found at Atlassians Git Migration Guide, it converts the remote branches and tags to normal git branches and tags.

However, can I be sure that after performing these steps the local git repository really contains the same files as the svn repo? Especially after reading Files Missing after svn clone I'd really like to be sure there are no differences in both repositorys. A colleague suggested writing a script that checks out every branch in git and svn, and then compares a hash sum of every file. I searched for a tool which does this, but I couldn't find one.

Is there a tool out there that compares the repositories against each other? Or is this functionality already built-in in git-svn? I'd be thankful for any suggestion or idea you have.

like image 639
Alex Avatar asked Mar 13 '26 20:03

Alex


1 Answers

A few years later, one could check out lunatic-cat/xxhashdir, a standalone executable which does fast filesystem fingerprinting using xxHash

xxHash is an extremely fast non-cryptographic hash algorithm, working at speeds close to RAM limits.

If you have both the right SVN revision checked out and the Git repository, you can quickly generate a text file with a hash signature for each file, and you can compare/diff the two text files.

like image 103
VonC Avatar answered Mar 16 '26 10:03

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!