Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an error updating shallow submodules #1899

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

EduardTalanov
Copy link
Contributor

When we try to execute
submodule_update(recursive=True, init=True)
in Repo class with shallow submodules, command
git fetch --progress -v origin
sometimes print log such as
=5 = [up to date] zm/160_uwp -> origin/zm/160_uwp
but it doesn't satisfy filter:
r"^ (.) ([[\w .$@]+]|[\w.$@]+) +(.+) -> ([^ ]+)( (.)?$)?"
and throw exception.
I've updated it so that it works correctly.

Fixed the error of updating shallow submodules
@Byron
Copy link
Member

Byron commented Apr 5, 2024

Do these numbers in =5 = [up to date] zm/160_uwp -> origin/zm/160_uwp (=5 =) look like an issue with parallelism on the server side, or do they have meaning?

@EduardTalanov
Copy link
Contributor Author

I don't think so. I've found this number only in one branch. Other branches didn't have this number.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

The new regex would unconditionally consume up to three characters, just as long as there is one more to capture, followed by a space.

This should be safe and handle this particular case.

@Byron Byron merged commit 174faa9 into gitpython-developers:main Apr 8, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants