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

Re: [PATCH] format-patch: generate valid patch with diff.noprefix config

From
Laurent Arnoud <laurent@spkdev.net>
Date
Jun 4, 2020, 19:32 UTC
Message-ID
<20200604193238.GA1911544@spk-laptop>
In-Reply-To
<xmqqeeqxrufz.fsf@gitster.c.googlers.com>
On Tue, Jun 02, 2020 at 03:09:36PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Having said all that, we seem to be letting more configurations for
> the diff.* family to affect the format-patch command.  The latest
> addition was "diff.relative"---together with the "diff.noprefix"
> that triggered this thread, some users may feel that it is a bug to
> allow these configuration variables to affect the output from the
> "log -p", "show", and "format-patch" commands.  
> 
> It *might* make sense to introduce log.diff.* configuration
> variables so that when they are set, they are used by
> log/show/format-patch instead of diff.* counterparts, or something
> along those lines.  I dunno.

I don't know if its a bug but I founded strange that I needed to use an alias "git -c diff.noprefix=false format-patch" to generate a patch that I can apply directly with "git am". I didn't know the -p option but to send a patch to a mailinglist it should have the prefix I guess ? I can try to implement this option if you think it can get merged

-- 
Laurent
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “format-patch: generate valid patch with diff.noprefix config”
  1. format-patch: generate valid patch with diff.noprefix configLaurent Arnoud, Jun 2, 2020
  2. Junio C HamanoJun 2, 2020
  3. Laurent ArnoudJun 2, 2020
  4. Junio C HamanoJun 2, 2020
  5. Laurent ArnoudJun 4, 2020
  6. Junio C HamanoJun 4, 2020
  7. Đoàn Trần Công DanhJun 4, 2020

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.