Skip to content

Conversation

@arxanas
Copy link
Owner

@arxanas arxanas commented Sep 12, 2022

Also addresses #515.

@arxanas arxanas marked this pull request as ready for review September 12, 2022 02:25
@arxanas arxanas force-pushed the arxanas/reword branch 3 times, most recently from 4caa3ff to 39e66ec Compare September 12, 2022 04:17
@claytonrcarter
Copy link
Collaborator

This looks good to me, FWIW. I like the clean up in reword.rs!

@arxanas arxanas force-pushed the arxanas/reword branch 2 times, most recently from a6d1342 to 3423bbe Compare September 14, 2022 02:58
This fails if we try to upgrade it (at the time of this writing, to `0.3.15`):

```
$ cargo update  # without version being locked to 0.3.11
$ cargo test -- main_branch
```
…e destination commits

We can already plan to rebase merge commits, so this isn't hard to implement: we just allow passing multiple parent commits. Actually executing the merge is where complications might arise (handled in the next commit to support rewording merge commits).
We don't support rebasing merge commits in-memory at present because we don't have a method for resolving conflicts that might arise as part of the attempt to create a new merge commit. Consequently, `git reword` also doesn't work on merge commits, since it uses the rebase machinery. Since `git reword` is guaranteed not to change the contents (or topology) of any of the reworded commits, we can make an exception for this case, and permit rebasing merge commits in memory when a replacement commit is specified, because that guarantees that we won't have to resolve merge conflicts.
@arxanas arxanas enabled auto-merge (rebase) September 16, 2022 03:38
@arxanas arxanas merged commit dd45eb8 into master Sep 16, 2022
@arxanas arxanas deleted the arxanas/reword branch September 16, 2022 03:40
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