> The existing code may want to see a preliminary > clean-up patch (PATCH 1/2) to move these messages to a set of > variables, so that the fix (PATCH 2/2) can swap the contents of > these variables based on the value of allow_empty_message, if it > makes the resulting code easier to follow (I haven't tried it, so > please tell me if that improved the code or not after trying to do > so ;-)). Tried to do this and the code does seem more maintainable. I'm not exactly sure if I did it the right way, though, so please do feel free to point out where I have done improperly. Also, sorry about the previous email -- I forgot to put one newline and got the quoted text truncated. I am really new to mailing lists and might make some silly mistakes :E Hu Jialun (2): commit: reorganise duplicate commit prompt strings commit: remove irrelavent prompt on `--allow-empty-message` builtin/commit.c | 31 ++++++++++++++--------- t/t7500-commit-template-squash-signoff.sh | 4 +-- t/t7502-commit-porcelain.sh | 4 +-- 3 files changed, 23 insertions(+), 16 deletions(-) -- 2.32.0