edit-mode: upon enter, modify commit consistently#13344
Merged
jonathantanmy2 merged 1 commit intomasterfrom Apr 16, 2026
Merged
edit-mode: upon enter, modify commit consistently#13344jonathantanmy2 merged 1 commit intomasterfrom
jonathantanmy2 merged 1 commit intomasterfrom
Conversation
There are currently some bugs and inconsistencies with how edit mode is
entered. In particular:
- all extra headers are cleared (not only the one that represents
conflicts)
- the conflict marker in the commit message title is not cleared, even
though (as stated in the previous bullet point) the conflict extra
header is cleared
Therefore, preserve all other extra headers, and clear the conflict
marker in the commit message title. This allows us to remove the
corresponding code that is run upon exiting edit mode, so remove that
too.
An alternative design choice would be:
1) not clear any extra headers or conflict markers in the commit
message title upon entering edit mode
2) clear the conflict extra header and the conflict marker in the
commit message title upon exiting edit mode
This is closer to the status quo, in which we do 2) but not 1). But I
think this is less user-friendly, as the user cannot see exactly what
commit is going to be committed.
68c4c76 to
c707f91
Compare
7 tasks
krlvi
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I'm not automerging: need a product decision (whether going with what's in this PR, the "alternative design choice" described below, or something else).
This is a follow-up from #13247 (comment) (that link is what's provided by GitHub but it doesn't work as it links to a resolved comment; it's a comment on
crates/gitbutler-edit-mode/src/lib.rs). The problem description by chatgpt-codex-connector is correct, and upon investigation, the problem is a bit more than described. This PR fixes everything I've seen in my investigation.There are currently some bugs and inconsistencies with how edit mode is
entered. In particular:
conflicts)
though (as stated in the previous bullet point) the conflict extra
header is cleared
Therefore, preserve all other extra headers, and clear the conflict
marker in the commit message title. This allows us to remove the
corresponding code that is run upon exiting edit mode, so remove that
too.
An alternative design choice would be:
message title upon entering edit mode
commit message title upon exiting edit mode
This is closer to the status quo, in which we do 2) but not 1). But I
think this is less user-friendly, as the user cannot see exactly what
commit is going to be committed.