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

Determine branch a & b are different in clone time #23485

Merged
merged 10 commits into from
Jan 8, 2025

Conversation

jikim-msft
Copy link
Contributor

@jikim-msft jikim-msft commented Jan 7, 2025

Description

27911

Related PR: #23424

Enhance TreeCheckout.clone() with Early Branch Validation

This PR adds upfront validation in TreeCheckout's clone() method to verify that the target branch shares a common ancestry with the source branch before attempting to clone revertibles. This validation:

  1. Fails fast if branches are unrelated, providing clearer error messages
  2. Moves the compatibility check from revert() to clone(), giving developers earlier feedback
  3. Improves developer experience by catching invalid clone attempts immediately rather than waiting until revert time

The change is supported by new test cases that verify the behavior of cloned revertibles across related and unrelated branches.

@Copilot Copilot bot review requested due to automatic review settings January 7, 2025 19:51
@jikim-msft jikim-msft requested a review from a team as a code owner January 7, 2025 19:51
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree base: main PRs targeted against main branch labels Jan 7, 2025

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@jikim-msft jikim-msft enabled auto-merge (squash) January 8, 2025 21:48
@github-actions github-actions bot added the area: runtime Runtime related issues label Jan 8, 2025
@github-actions github-actions bot removed the area: runtime Runtime related issues label Jan 8, 2025
@jikim-msft jikim-msft merged commit 1824858 into microsoft:main Jan 8, 2025
28 checks passed
@jikim-msft jikim-msft deleted the revertibles/throw-in-clone branch January 8, 2025 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: tree area: dds Issues related to distributed data structures base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants