I am currently converting a CVS repository to multiple git repositories.
The cvs2git process is great, but then I have problems with filter-branch commands. I test the commands with simple scripts because the main repository size is 4Go with a commit of more than 14,000.
During the process, I want to replace some archives with my content in the git repository history.
Here is the script I use to test my filter-branch -tree-filter command:
#!/bin/bash BASEDIR=/tmp/migration_git if test ! -d $BASEDIR; then mkdir $BASEDIR fi script_tree_filter='\ archives=`find . -name "archive.tgz"`; \ CURDIR=`pwd`; \ for archive in $archives; do \ cd `dirname $archive`; \ tar xzf archive.tgz ; \ rm -f archive.tgz ; \ cd $CURDIR;\ done' cd $BASEDIR if test -d repo.server.git; then rm -rf repo.server.git; fi mkdir repo.server.git && cd repo.server.git && git init touch a toto && tar czf archive.tgz a && rm a && git add . && git commit -am "1st commit" && git tag commit1 touch ba && rm archive.tgz && tar czf archive.tgz ab && rm ab && git commit -am "2nd commit" && git tag commit2 touch abc && rm archive.tgz && tar czf archive.tgz abc && rm abc && git commit -am "3rd commit" && git tag commit3
I have 2 questions:
At the end of the script, an error is displayed during the process:
Error: The processed work file "a" will be overwritten by the merge.
If the client clone is executed with --mirror:
git clone --mirror repo.server.git repo.client.git
the error will not appear. I do not understand why.
When I write cd to repo.client.git, the repository has local modifications: the archives are present, and the files I wanted to save are git deleted. I donβt get it either. Edit: either files a, b, c, d are empty or not, this does not change the result.
source share