git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
KKelson <kelson@shysecurity.com>
Date
Dec 11, 2014, 21:41 UTC
Message-ID
<548A0F73.80109@shysecurity.com>
In-Reply-To
<CACsJy8CBRzbVrKnKPACuqxLw2N3PiK2O2nE4-C_3jfEp6-2p=g@mail.gmail.com>

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 <pclouds@gmail.com>
Sent: 12/11/2014 08:37 AM
To: Kelson <kelson@shysecurity.com>
CC: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] added git-config support for diff.relative setting
On Thu, Dec 11, 2014 at 2:28 PM, Kelson <kelson@shysecurity.com> wrote:
Show 16 quoted lines
> @@ -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.

Previous: Duy NguyenNext: Kelson
Message 3 of 13 in “added git-config support for diff.relative setting”
  1. added git-config support for diff.relative settingKelson, Dec 11, 2014
  2. Duy NguyenDec 11, 2014
  3. KelsonDec 11, 2014
  4. added git-config support for diff.relative settingKelson, Dec 12, 2014
  5. 1/2 git-config support for diff.relative settingkelson@shysecurity.com, Dec 21, 2014
  6. 1/2 git-config support for diff.relative settingkelson@shysecurity.com, Dec 30, 2014
  7. Junio C HamanoDec 30, 2014
  8. 1/2 support for --no-relative and diff.relativekelson@shysecurity.com, Dec 30, 2014
  9. 1/2 support for --no-relative and diff.relativekelson@shysecurity.com, Jan 6, 2015
  10. Junio C HamanoJan 7, 2015
  11. kelson@shysecurity.comJan 7, 2015
  12. Junio C HamanoJan 7, 2015
  13. Junio C HamanoJan 7, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.