Переглянути джерело

Add submodule check

#13
tags/v1.0
JustAnotherArchivist 1 рік тому
джерело
коміт
7861036624
1 змінених файлів з 5 додано та 0 видалено
  1. +5
    -0
      codearchiver/modules/git.py

+ 5
- 0
codearchiver/modules/git.py Переглянути файл

@@ -154,6 +154,11 @@ class Git(codearchiver.core.Module):
os.remove('tmp.pack') os.remove('tmp.pack')
os.remove('tmp.idx') os.remove('tmp.idx')


_logger.info('Checking for submodules')
_, commitsWithSubmodules, _ = codearchiver.subprocess.run_with_log(['git', 'log', '--format=format:%H', '--diff-filter=d', '--all', '--', '.gitmodules'], cwd = directory)
if commitsWithSubmodules:
_logger.warning('Submodules found but extraction not supported')

_logger.info(f'Removing clone') _logger.info(f'Removing clone')
shutil.rmtree(directory) shutil.rmtree(directory)




Завантаження…
Відмінити
Зберегти