소스 검색

Backup subtree cache when adding new remote

Willy-JL 1 년 전
부모
커밋
bc95043570
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      .utils/add-subtree.sh

+ 4 - 0
.utils/add-subtree.sh

@@ -36,6 +36,10 @@ else
 fi
 
 if [ "${prevremotedir}" != "" ]; then
+    if [ -e "${path}/.subtree-cache" ]; then
+        # Backup subtree cache
+        cp -rT "${path}/.subtree-cache" "${prevremotedir}/.subtree-cache"
+    fi
     rm -r "${path}"
     mv -T "${prevremotedir}" "${path}"
 fi