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

Re: bug? git format-patch -M -D then git am fails

From
Joe Perches <joe@perches.com>
Date
Nov 13, 2012, 23:06 UTC
Message-ID
<1352847962.17444.27.camel@joe-AO722>
In-Reply-To
<7vsj8dcdv6.fsf@alter.siamese.dyndns.org>
On Tue, 2012-11-13 at 14:55 -0800, Junio C Hamano wrote:
Show 19 quoted lines
> Joe Perches <joe@perches.com> writes:
> 
> > (Sorry about the partial message.
> >  evolution and ctrl-enter sends, grumble...)
> >
> > If a file is deleted with git rm and a patch
> > is then generated with git format-patch -M -D
> > git am is unable to apply the resultant patch.
> >
> > Is this working as designed?
> 
> I would say it is broken as designed and it is even documented.
> 
> Please run "git format-patch --help | less" and then type
> "/--irreversible-delete" to find:
> 
>     The resulting patch is not meant to be applied with patch nor
>     git apply; this is solely for people who want to just
>     concentrate on reviewing the text after the change.

yeah, it's just that not using -D can result in some unfortunately large patches being sent to mailing lists. I don't believe that reversibility is a really useful aspect of deletion patches when there are known git repositories involved.

cheers, Joe
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “bug? git format-patch -M -D then git am fails”
  1. Joe PerchesNov 13, 2012
  2. Junio C HamanoNov 13, 2012
  3. Joe PerchesNov 13, 2012
  4. Junio C HamanoNov 13, 2012
  5. Michael J GruberNov 14, 2012

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.