Subject: Re: [PATCH] added git-config support for diff.relative setting

From: Kelson <[email-masked]>
Date: Thu, 11 Dec 2014 16:41:07 -0500

That is quite manageable. I was concerned that --relative changes the UI 
(relative paths) and behavior (excluding files outside the current 
directory), which might not be clear if placed in just the UI component. 
You make a great point that git_diff_basic_config drives other commands 
though, like git-bisect, which --relative would not effect.

-----Original Message-----
From: Duy Nguyen <[email-masked]>
Sent: 12/11/2014 08:37 AM
To: Kelson <[email-masked]>
CC: Git Mailing List <[email-masked]>
Subject: Re: [PATCH] added git-config support for diff.relative setting

On Thu, Dec 11, 2014 at 2:28 PM, Kelson <[email-masked]> wrote:
> @@ -270,6 +270,14 @@ int git_diff_basic_config(const char *var, const char
> *value, void *cb)
>                  return 0;
>          }
>
> +       if (!strcmp(var, "diff.relative")) {
> +               if (git_config_bool(var, value))
> +                       DIFF_OPT_SET(&default_diff_options, RELATIVE_NAME);
> +               else
> +                       DIFF_OPT_CLR(&default_diff_options, RELATIVE_NAME);
> +               return 0;
> +       }
> +
>          if (starts_with(var, "submodule."))
>                  return parse_submodule_config_option(var, value);
>

This affects more than just git-diff. git_diff_ui_config() may be a
better place.