RE: [PATCH v2 2/2] commit: remove irrelavent prompt on `--allow-empty-message`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hu Jialun wrote:

> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -918,7 +918,9 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
>  		if (cleanup_mode == COMMIT_MSG_CLEANUP_ALL) {
>  			status_printf_ln(s, GIT_COLOR_NORMAL, msg_enter_prompt);
>  			status_printf_ln(s, GIT_COLOR_NORMAL, ignore_char_prompt, comment_line_char);
> -			status_printf_ln(s, GIT_COLOR_NORMAL, empty_msg_abort_prompt);
> +			if (!allow_empty_message) {
> +				status_printf_ln(s, GIT_COLOR_NORMAL, empty_msg_abort_prompt);
> +			}

In git the style is to avoid braces if the content of the condition is a
single line.

-- 
Felipe Contreras



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux