File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
scripts/split_repo_migration Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ echo "Created working directory: ${WORKDIR}"
7070pushd " ${WORKDIR} " # cd into workdir
7171
7272echo " Cloning source repository: ${SOURCE_REPO} "
73- git clone --recurse-submodules " git@github.com:${SOURCE_REPO} .git" source-repo
73+ git clone " git@github.com:${SOURCE_REPO} .git" source-repo
7474
7575pushd source-repo
7676
@@ -124,7 +124,7 @@ git filter-branch \
124124 --force \
125125 --prune-empty \
126126 --tree-filter \
127- " git submodule update --init --recursive; find . -mindepth 2 -name .git -exec rm -rf {} +; shopt -s dotglob; mkdir -p ${WORKDIR} /migrated-source; mv * ${WORKDIR} /migrated-source; mkdir -p ${TARGET_PATH} ; { mv ${WORKDIR} /migrated-source/* ${TARGET_PATH} || echo 'No files to move' ; }"
127+ " shopt -s dotglob; mkdir -p ${WORKDIR} /migrated-source; mv * ${WORKDIR} /migrated-source; mkdir -p ${TARGET_PATH} ; { mv ${WORKDIR} /migrated-source/* ${TARGET_PATH} || echo 'No files to move' ; }"
128128
129129# back to workdir
130130popd
@@ -142,8 +142,8 @@ echo "Success"
142142popd # back to workdir
143143
144144# Do a diff between source code split repo and migrated code.
145- git clone --recurse-submodules " git@github.com:${SOURCE_REPO} .git" source-repo-validation # Not ideal to clone again.
146- find source-repo-validation -name .git -exec rm -rf {} + # That folder is not needed for validation.
145+ git clone " git@github.com:${SOURCE_REPO} .git" source-repo-validation # Not ideal to clone again.
146+ rm -rf source-repo-validation/ .git # That folder is not needed for validation.
147147
148148DIFF_FILE=" ${WORKDIR} /diff.txt"
149149if diff -r " ${TARGET_REPO} /${TARGET_PATH} " source-repo-validation > " ${DIFF_FILE} " ; then
You can’t perform that action at this time.
0 commit comments