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

[rush] Add a more useful error message in cases when a merge base for rush change cannot be determined. #3668

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

iclanton
Copy link
Member

@iclanton iclanton commented Oct 3, 2022

Addresses #3663.

Summary

This change adds an error message when Rush tries to find the merge base during an operation like rush change and can't find the merge base. Currently, Rush gives the cryptic

ERROR: The command failed with exit code 1

message. With this change, the error message will read

Unable to determine merge base for branch "<BRANCH NAME>". This can occur if the current clone is a shallow clone. If this clone is running in a CI pipeline, check your pipeline settings to ensure that the clone depth includes the expected merge base. If this clone is running locally, consider running "git fetch --deepen".

How it was tested

Tested on a shallow clone.

@iclanton iclanton merged commit f95cc6d into microsoft:main Oct 3, 2022
@iclanton iclanton deleted the shallow-clone-error-message branch October 3, 2022 20:33
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.

[rush] Azure DevOps pipelines shallow fetch =1 is now default
3 participants