Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: >> In general, it might be helpful to warn very loudly upon doing a commit >> --amend after fixing conflicts, but an implementation would probably be >> ugly and for all I know, there might be people who frequently cause >> conflicts while amending; those guys would probably be quite annoyed at >> such a warning. > > I've also introduced the error Peter describes into my history because > I wasn't careful. That required some splitting / reflog fixes later. > > Perhaps the best way to solve this would be to change the content of > COMMIT_EDITMSG in cases like these so it gives you an explicit warning > about what you're about to do. > > We already do this for merges, from builtin/commit.c: Very good point. "Users are told when the command gives back control, is the best "rebase -i" could do, but by definition the users are free to shoot themselves in the foot when given control, and "commit --amend" is the only sensible place to give further safeguard against this issue. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html