Skip to content

Adds support for composing without a base commit#4656

Merged
ramin-t merged 1 commit intomainfrom
feature/composer-no-base-commit
Oct 17, 2025
Merged

Adds support for composing without a base commit#4656
ramin-t merged 1 commit intomainfrom
feature/composer-no-base-commit

Conversation

@ramin-t
Copy link
Contributor

@ramin-t ramin-t commented Oct 3, 2025

Closes #4637

Strategy here is to create an empty base commit without touching the working tree by using temporary index and commit-tree, then pointing HEAD to it, and then there is a commit that we can stash on temporarily. We then proceed to create the composer commits as patches and commit them with a similar strategy, except they are on another temporary index off the root sha. Then when we reset, our stash and empty commit are orphaned but still accessible. We pop the stash as normal and then let garbage collection eliminate the temporary empty commit we created.

@ramin-t ramin-t self-assigned this Oct 3, 2025
@ramin-t ramin-t requested a review from eamodio October 3, 2025 21:33
@ramin-t ramin-t force-pushed the feature/composer-no-base-commit branch from 4b8ebee to 2525c58 Compare October 8, 2025 17:01
@ramin-t ramin-t requested a review from d13 October 15, 2025 21:45
Copy link
Member

@d13 d13 left a comment

Choose a reason for hiding this comment

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

LGTM

@ramin-t ramin-t force-pushed the feature/composer-no-base-commit branch from 2525c58 to 0578fd7 Compare October 17, 2025 14:50
@ramin-t ramin-t merged commit 9233c3b into main Oct 17, 2025
4 checks passed
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.

Add support for using commit composer without a base commit

2 participants