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

Fix a bug when git padding warning message start with /[a-f]/ #7428

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rockwyc992
Copy link

Summary

Fix #5077 #5013 #7239
The regex filter in #5081 is too simple to match some use case.
If there is a warning message start with /[a-f]/, it will broken its behavior.

Test plan

Modify spawnGit mock implementation with 5 use case:

  1. resolveDefaultBranch when remote
  2. resolveDefaultBranch when remote with 'Identity added' warning message (Couldn't find match for "Identity" #5077)
  3. resolveDefaultBranch when remote with 'Failed to add the host' warning message (yarn fails to install git+ssh:// repo when ssh warns about "Warning: Permanently added" #5013)
  4. resolveDefaultBranch when remote with "Warning:" message (yarn fails to install git+ssh:// repo when ssh warns about "Warning: Permanently added" #5013)
  5. resolveDefaultBranch when remote with 'fatal:' error message (Install package from git fail when there is something unexcept #7239)

@rockwyc992
Copy link
Author

rebase upstream to resolve CHANGELOG.md conflict.

@rockwyc992
Copy link
Author

Use wrapper to refactor spawnMock.

@rockwyc992
Copy link
Author

rebase again and again.

1. resolveDefaultBranch when remote
2. resolveDefaultBranch when remote with 'Identity added' warning message (yarnpkg#5077)
3. resolveDefaultBranch when remote with 'Failed to add the host' warning message (yarnpkg#5013)
4. resolveDefaultBranch when remote with "Warning:" message (yarnpkg#5013)
5. resolveDefaultBranch when remote with 'fatal:' error message (yarnpkg#7239)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Couldn't find match for "Identity"
1 participant