Skip to content

Implement branch.squash #5696

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

Merged
merged 13 commits into from
Jun 4, 2025
Merged

Implement branch.squash #5696

merged 13 commits into from
Jun 4, 2025

Conversation

ChrisPenner
Copy link
Member

@ChrisPenner ChrisPenner commented May 14, 2025

Overview

Implements branch.squash by request from @ceedubs and @stew, which should allow them to creating small sync files quickly which will be nice for speeding up some of their docker builds.

Note that there still doesn't appear to be a clone.squashed, which would probably be nice for testing trunk builds 🤔

Implementation notes

  • Adds new branch.squash command.
    • branch.squash src dest squashes src into dest. Where src and dest can be project/branch /branch etc.

Interesting/controversial decisions

I started by allowing it to accept a causal hash, path, etc. but the input parsing drove me nuts so I backstepped to something simpler.

Test coverage

Transcripts

@ChrisPenner ChrisPenner marked this pull request as ready for review May 15, 2025 19:25
@ceedubs
Copy link
Contributor

ceedubs commented May 22, 2025

Build failures aside this seems good to me!

@ChrisPenner ChrisPenner changed the base branch from trunk to topic/cacheroot May 23, 2025 16:49
@ChrisPenner ChrisPenner changed the base branch from topic/cacheroot to trunk May 23, 2025 16:49
@ChrisPenner
Copy link
Member Author

I've finally wrangled myself into passing transcripts haha @aryairani

@aryairani
Copy link
Contributor

We'll have to re-run transcripts after merging #5705, so I'll hold off until after that.

Copy link
Contributor

@aryairani aryairani left a comment

Choose a reason for hiding this comment

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

Go ahead and merge w/ resolving conflict; It looks like the case just needs to be copied over in HandleInput

@aryairani aryairani merged commit 28663e0 into trunk Jun 4, 2025
1 check passed
@aryairani aryairani deleted the cp/branch-squash branch June 4, 2025 16:13
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.

3 participants