This commit is contained in:
madhurig 2015-11-19 17:19:16 -05:00
Родитель 0bcdf3d80d
Коммит 20a22ae11a
1 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

@ -25,7 +25,7 @@ echo Delete local mirror directory
IF EXIST %mirrorDirName% rd /S /Q %mirrorDirName% IF EXIST %mirrorDirName% rd /S /Q %mirrorDirName%
echo Clone master repository to mirror directory echo Clone master repository to mirror directory
git clone --mirror %masterRepoUrl% %mirrorDirName% git clone --no-checkout %masterRepoUrl% %mirrorDirName%
IF NOT EXIST %mirrorDirName% GOTO ERROR IF NOT EXIST %mirrorDirName% GOTO ERROR
IF NOT %ERRORLEVEL% EQU 0 GOTO ERROR IF NOT %ERRORLEVEL% EQU 0 GOTO ERROR
@ -34,10 +34,6 @@ cd %mirrorDirName%
echo Set remote push url to the mirror repository url echo Set remote push url to the mirror repository url
git remote set-url --push origin %mirrorRepoURL% git remote set-url --push origin %mirrorRepoURL%
echo Fetch and prune refs from master repository
git fetch -p origin
IF NOT %ERRORLEVEL% EQU 0 GOTO ERROR
echo Push to the mirror repository echo Push to the mirror repository
git push --mirror git push --mirror
IF NOT %ERRORLEVEL% EQU 0 GOTO ERROR IF NOT %ERRORLEVEL% EQU 0 GOTO ERROR