Problem: Legacy svn repo has a directory that is synced from user config on a prod server.
The sync effectively:
Is it possible to filter out all of the file deletes during a git svn clone of this repo?
And subsequent git svn fetches as well?
I don't necessarily want to filter the entire commit just the parts that delete files.
This would mean changing the subsequent add files to become modify files.
First off, if you want more control over your repo conversion, you may want to consider using Reposurgeon rather than git-svn
Owing to the way that Git works, the impact of these evil practices in SVN are less severe than you think though.
Firstly, Git itself has no notion of "file history". There is no such thing as a "file modify" like there is in SVN or other VCS systems. Git only remembers a tree of files. And then another tree of files. Etc.
If you compare HEAD to HEAD^^ (where HEAD^ is the intervening "deleted" commit), you will get results no different to those you'd get if you managed to leave the "deleted" revision out altogether.
In addition, the storage requirements will not be very much greater - Git stores whole objects and compares them for similarity when making packs, unlike SVN which uses delta compression (and thus depends on that file history). Tree A + empty tree + Tree B (composed of mostly the same files) will take a very tiny extra bit of space compared to missing out the empty tree revisions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With