# git format-patch --no-renames

2 messages from 2026-02-03 to 2026-02-04. Participants: Chris Packham, Jeff King.
Thread: https://gitlist.dev/t/64910

## Chris Packham, 2026-02-03 19:58

Subject: git format-patch --no-renames
Message-ID: <CAFOYHZDn-e5P9Rs3=2oS857QvYnHbpYq23x3RCkDWTTVGg5gNA@mail.gmail.com>
URL: https://gitlist.dev/e/CAFOYHZDn-e5P9Rs3%3D2oS857QvYnHbpYq23x3RCkDWTTVGg5gNA%40mail.gmail.com

```
Hi Git,

The man page section for the --no-renames options says "Turn off
rename detection, even when the configuration file gives the default
to do so."

But I can't actually see what option that might be.Does git
format-patch use the same config as git -diff?

Selfishly I'd like `git diff` to show renames but `git format-patch`
to output things that can be applied by `patch` (specifically a
version that doesn't understand renames).

```

## Jeff King, 2026-02-04 02:09

Subject: Re: git format-patch --no-renames
Message-ID: <20260204020912.GA350923@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20260204020912.GA350923%40coredump.intra.peff.net
In-Reply-To: <CAFOYHZDn-e5P9Rs3=2oS857QvYnHbpYq23x3RCkDWTTVGg5gNA@mail.gmail.com>

```
On Wed, Feb 04, 2026 at 08:58:29AM +1300, Chris Packham wrote:

> The man page section for the --no-renames options says "Turn off
> rename detection, even when the configuration file gives the default
> to do so."
> 
> But I can't actually see what option that might be.Does git
> format-patch use the same config as git -diff?

Yes, it's just diff.renames, which controls rename detection for most
commands, including git-diff and git-log. The notable exception is for
plumbing commands like diff-files.

> Selfishly I'd like `git diff` to show renames but `git format-patch`
> to output things that can be applied by `patch` (specifically a
> version that doesn't understand renames).

There's no way to do that right now via config. You'll have to use
"--no-renames" or "-c diff.renames=false", either manually or using a
command alias.

If you want to change that, the usual approach is to have a
command-specific option that defaults to the more generic one. So add
format.renames, and if it's not set, fall back to diff.renames as we do
now. There's some prior art in the merge.renames and status.renames
options.

-Peff

```
