Filter Removes during git svn clone?

Problem: Legacy svn repo has a directory that synchronizes with the user configuration on the prod server.

Sync Effect:

  • deletes all files
  • commits
  • copies all files
  • commits

Is it possible to filter out all deleted files during the git svn clone of this repo?

And subsequent git svn are also selected?

I don’t necessarily want to filter the entire commit of only those parts that delete files.

This would mean changing subsequent add files to become modified files.

+6
source share
1 answer

First of all, if you want more control over your repo conversion, you may need to use Reposurgeon , not git - SVN


Thanks to the fact that Git works, the influence of these evil practices in SVN is less serious than you think.

First of all, Git itself does not have the concept of file history. There is no such thing as a “file change" like in SVN or other VCS systems. Git only remembers the file tree. And then another file tree. Etc.

If you compare HEAD with HEAD ^^ (where HEAD ^ is an intermediate "remote" fix), you will get results that are not different from those you would get if you could completely remove the "remote" version.

In addition, storage requirements will not be much larger - Git stores entire objects and compares them for similarities when creating packages, unlike SVN, which uses delta compression (and therefore depends on this file history). Tree A + empty tree + tree B (consisting mainly of the same files) will occupy a very small extra bit of space compared to the absence of empty tree changes.

+1
source

All Articles