josegonzalez/python-github-backup

When the `--lfs` option is used, after first clone non-lfs content is no longer fetched

codysch opened this issue · 2 comments

It's because of these lines:

        if lfs_clone:
            git_command = ['git', 'lfs', 'fetch', '--all', '--prune']
        else:
            git_command = ['git', 'fetch', '--all', '--force', '--tags', '--prune']

Which should instead be something like

        git_command = ['git', 'fetch', '--all', '--force', '--tags', '--prune']
        # TODO: execute the first git command
        if lfs_clone:
            git_command = ['git', 'lfs', 'fetch', '--all', '--prune']
            # TODO: execute this second git command

Pull requests welcome.

I made a PR for this: #338