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

Re: RFE: Split diff.noprefix for git-diff and git-format-patch

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 2, 2021, 17:20 UTC
Message-ID
<xmqqr1auvs7m.fsf@gitster.g>
In-Reply-To
<s6r03p31-o7o7-2142-9oo7-qno483r213s5@vanv.qr>
Jan Engelhardt <jengelh@inai.de> writes:
Show 8 quoted lines
> In interactive git-diff invocations, prefixless is the arguably desired mode,
> so as to facilitate xterm copy-and-paste of the pathname (since a/ does not
> exist, you would want to have it in the copypaste operation anywhere).
>
> I can see why git-format-patch would make use of the "diff.noprefix"
> config directive, but equally, it's a bug that diff.noprefix has such
> broad implications and that there is no way to distinguish between
> diff and format-patch.

I do not think it is unthinkable to have "log.*" configuration variables that mirror "diff.*" configuration variables and have them override the broader "diff.*" counterparts, and further add "format.*" configuration variables to do the same as even narrower override.

I do not offhand recall hearing anybody who wanted format.noprefix separately in the past, and I take it a sign that people are happy with paths with prefix in their "interactive" invocations. I of course am among those, as that is most of the diff snippet I send to the list are created when I say "how about doing it this way" in my response and tell "\C-u \M-! git diff --stat -p" to Emacs to include the output from the command to the message I am composing.

Previous: Jan EngelhardtNext: Jan Engelhardt
Message 4 of 11 in “http-backend: give a hint that web browser access is not supported”
  1. http-backend: give a hint that web browser access is not supportedJan Engelhardt, Dec 2, 2021
  2. Junio C HamanoDec 2, 2021
  3. RFE: Split diff.noprefix for git-diff and git-format-patch (was: http-backend: give a hint that web browser access is not supported)Jan Engelhardt, Dec 2, 2021
  4. Junio C HamanoDec 2, 2021
  5. http-backend: give a hint that web browser access is not supportedJan Engelhardt, Dec 2, 2021
  6. Junio C HamanoDec 4, 2021
  7. Jan EngelhardtDec 4, 2021
  8. Junio C HamanoDec 5, 2021
  9. Jan EngelhardtDec 5, 2021
  10. Junio C HamanoDec 5, 2021
  11. Junio C HamanoDec 5, 2021

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.