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

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

From
Kkelson@shysecurity.com <kelson@shysecurity.com>
Date
Dec 21, 2014, 19:41 UTC
Message-ID
<54972281.9050603@shysecurity.com>
In-Reply-To
<xmqq61d5d7yn.fsf@gitster.dls.corp.google.com>
> "Philip Oakley" <philipoakley@iee.org> wrote:
> Shouldn't this `(identical to "git diff --relative")` also be
>included in the documentation change? It would truly clarify the
> intenbt for the reader.

Updated as follows: +diff.relative:: + Show pathnames relative to the current directory and exclude + changes outside this directory; equivalent to the 'git diff' + option '--relative'.

> "Junio C Hamano" <gitster@pobox.com> wrote:
> There should be a way to run non-relative diff in a repository that
> has the configuration set, perhaps by overriding with some command
> line option (e.g. "--no-relative").

Good idea; I'll put together a second patch for a "--no-relative" option to disable diff.relative.

-----Original Message-----
From: Junio C Hamano <gitster@pobox.com>
Sent: 12/20/2014 09:58 PM
To: Philip Oakley <philipoakley@iee.org>
CC: <kelson@shysecurity.com>,  "Git Mailing List" <git@vger.kernel.org>, 
  "Duy Nguyen" <pclouds@gmail.com>,  "Jonathan Nieder" <jrnieder@gmail.com>
Subject: Re: [PATCH v2] git-config support for diff.relative setting
"Philip Oakley" <philipoakley@iee.org> writes:
Show 8 quoted lines
> From: <kelson@shysecurity.com>
>> By default, git-diff shows changes and pathnames relative to the
>> repository root. Setting the diff.relative config option to "true"
>> shows pathnames relative to the current directory and excludes
>> changes outside this directory (identical to "git diff --relative").
> Shouldn't this `(identical to "git diff --relative")` also be included
> in the documentation change? It would truly clarify the intenbt for
> the reader.

A configuration that sticks a non-default behaviour without a way to revert to the default is a no-no.

There should be a way to run non-relative diff in a repository that has the configuration set, perhaps by overriding with some command line option (e.g. "--no-relative").

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “git-config support for diff.relative setting”
  1. git-config support for diff.relative settingkelson@shysecurity.com, Dec 20, 2014
  2. Philip OakleyDec 20, 2014
  3. Junio C HamanoDec 21, 2014
  4. kelson@shysecurity.comDec 21, 2014
  5. Junio C HamanoDec 21, 2014

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.