Re: [PATCH 2/2] diff: add 'diff.wordDiff' config option

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

 



On Sat, Mar 2, 2024 at 4:58 AM Karthik Nayak <karthik.188@xxxxxxxxx> wrote:
> The git-diff(1) command supports the `--word-diff` which allows the
> users to specify how to delimit word diffs. Provide this option also as
> a config param 'diff.wordDiff'.
>
> Signed-off-by: Karthik Nayak <karthik.188@xxxxxxxxx>
> ---
> diff --git a/diff.c b/diff.c
> @@ -209,6 +210,23 @@ int git_config_rename(const char *var, const char *value)
> +static int parse_word_diff_value(const char *value)
> +{
> +       if (!value)
> +               return -1;
> +       else if (!strcmp(value, "plain"))
> +               return DIFF_WORDS_PLAIN;
> +       else if (!strcmp(value, "color")) {
> +               return DIFF_WORDS_COLOR;
> +       }
> +       else if (!strcmp(value, "porcelain"))
> +               return DIFF_WORDS_PORCELAIN;
> +       else if (!strcmp(value, "none"))
> +               return DIFF_WORDS_NONE;
> +
> +       return -1;
> +}

Why is one arm surrounded by curly braces when none of the others are?





[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