-
Notifications
You must be signed in to change notification settings - Fork 28
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
idea: Support rewording summaries directly in the -i view #34
Comments
I considered allowing rewording of the summary line in the base interactive view, but was worried it might be surprising for the changes there to be reflected in actual commits. It might be worth supporting this, but keeping a git config (maybe |
I'd love this with a config, but without a config the behavior would be a surprising departure from what rebase does IMO. |
I can't think of a case where the user makes a change, saves, exits, and expects the change to be discarded, but I can think of cases where an editor might mispreserve text. Like unicode normalization, illegal byte sequences, non-printable characters, or line ending conventions. Assuming that most users won't encounter these problems in their immediate git history, a config option might actually make sense. That said, the need for configurability is often a sign of a bad idea (see fish design doc: Configurability is the root of all evil). A compromise might be a sort of inline-reword command, that does the same, just makes the intent explicit. |
The reason the git rebase syntax works this way is that you should be able to just deal with commit hashes, revise does the same thing. The commit messages are basically comments, there to help you, but not consumed by the tool. It's hard to tell the intent behind a "change", the user might have typed in an extra commit to be cherry picked, and that shouldn't automatically mean its message is set to the empty string.
|
+1 for a command for this; maybe |
This feature would introduce some ambiguity about what would happen to the body of the commit message when editing the summary in the interactive revise window. Is the body removed or kept? It's not obvious to me which behaviour is most useful and/or least surprising. If I happened to be running an interactive revise and noticed a typo in a message summary, I would be quite surprised if fixing that typo wiped out the message body. Conversely, if I completely rewrote the message summary while doing an interactive revise, I might be surprised if the old message body stuck around. Personally, I'd be much more interested in some kind of
|
|
To be precise, I only meant for the summary line to be affected, since there is |
while this has happened to me too in that past, i wouldnt do this. Another simple option is to stick it in you face that the messages are just here as |
Argh, I haven't stopped fooling myself. It's too intuitive.
I'm not hopeful. This is a routine task – I wouldn't notice if the comments changed ever so much, because I'm laser focused on those commit summaries. My brain sees text, changes it, saves, force pushes my feature branch and goes home for the weekend. Then, I remember that it doesn't work. |
I have something here: (That's a branch for adding together PRs and other unreleased work in progress) |
I think |
I know from past
git rebase -i
usage that I sometimes instinctively try to edit commit summary lines directly in the interactive line view, instead of selecting to reword each messaage. Which just drops my changes. And despite learning this lesson numerous times, it still happens that I forget myself.Learning that the awesome
git revise -ie
command supports bulk renaming, I had to see what it would do in-i
mode, and the story seems to be the same. Thus what the headline suggests.Benefits:
-i
mode for other reasons.-ie
view less ideal when you only want to edit the first line of each commit).The text was updated successfully, but these errors were encountered: