{"thread":{"id":"64910","subject":"git format-patch --no-renames","startedAt":"2026-02-03T19:58:42Z","lastAt":"2026-02-04T02:09:14Z","messageCount":2,"participants":["Chris Packham","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"535090","messageId":"CAFOYHZDn-e5P9Rs3=2oS857QvYnHbpYq23x3RCkDWTTVGg5gNA@mail.gmail.com","threadId":"64910","inReplyTo":null,"subject":"git format-patch --no-renames","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2026-02-03T19:58:29Z","receivedAt":"2026-02-03T19:58:42Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi Git,\n\nThe man page section for the --no-renames options says \"Turn off\nrename detection, even when the configuration file gives the default\nto do so.\"\n\nBut I can't actually see what option that might be.Does git\nformat-patch use the same config as git -diff?\n\nSelfishly I'd like `git diff` to show renames but `git format-patch`\nto output things that can be applied by `patch` (specifically a\nversion that doesn't understand renames).\n"},{"id":"535113","messageId":"20260204020912.GA350923@coredump.intra.peff.net","threadId":"64910","inReplyTo":"CAFOYHZDn-e5P9Rs3=2oS857QvYnHbpYq23x3RCkDWTTVGg5gNA@mail.gmail.com","subject":"Re: git format-patch --no-renames","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-02-04T02:09:12Z","receivedAt":"2026-02-04T02:09:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 04, 2026 at 08:58:29AM +1300, Chris Packham wrote:\n\n> The man page section for the --no-renames options says \"Turn off\n> rename detection, even when the configuration file gives the default\n> to do so.\"\n> \n> But I can't actually see what option that might be.Does git\n> format-patch use the same config as git -diff?\n\nYes, it's just diff.renames, which controls rename detection for most\ncommands, including git-diff and git-log. The notable exception is for\nplumbing commands like diff-files.\n\n> Selfishly I'd like `git diff` to show renames but `git format-patch`\n> to output things that can be applied by `patch` (specifically a\n> version that doesn't understand renames).\n\nThere's no way to do that right now via config. You'll have to use\n\"--no-renames\" or \"-c diff.renames=false\", either manually or using a\ncommand alias.\n\nIf you want to change that, the usual approach is to have a\ncommand-specific option that defaults to the more generic one. So add\nformat.renames, and if it's not set, fall back to diff.renames as we do\nnow. There's some prior art in the merge.renames and status.renames\noptions.\n\n-Peff\n"}]}