From: Hu Jialun Date: Wed, 07 Jul 2021 16:23:06 GMT Subject: Re: [PATCH] commit: remove irrelavent prompt on `--allow-empty-message` Message-ID: <20210707162308.2438170-1-hujialun@comp.nus.edu.sg> In-Reply-To: <20210706022438.580374-1-hujialun@comp.nus.edu.sg> > 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