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

Re: git apply fails to apply a renamed file in a new directory

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 25, 2007, 21:35 UTC
Message-ID
<20071025213523.GD11308@steel.home>
In-Reply-To
<20071025213038.GC11308@steel.home>
Alex Riesen, Thu, Oct 25, 2007 23:30:38 +0200:
Show 14 quoted lines
> Sam Ravnborg, Thu, Oct 25, 2007 20:07:37 +0200:
> > I just stumbled on what looks like a simple bug in git apply.
> > I had following diff:
> > 
> > diff --git a/arch/i386/defconfig b/arch/x86/configs/i386_defconfig
> > similarity index 100%
> > rename from arch/i386/defconfig
> > rename to arch/x86/configs/i386_defconfig
> > diff --git a/arch/x86_64/defconfig b/arch/x86/configs/x86_64_defconfig
> > similarity index 100%
> > rename from arch/x86_64/defconfig
> > rename to arch/x86/configs/x86_64_defconfig
> > -- 
> > 1.5.3.4.1157.g0e74-dirty

.1157...-dirty. Your git looks heavily modified. Could you try with a something like master of kernel.org?

Mine is based off d90a7fda355c251b8ffdd79617fb083c18245ec2 (builtin-fetch got merged).

Show 5 quoted lines
> > When trying to apply this diff using:
> > git apply -p1 < .../patch
> 
> works here. Don't use -p1, it is assumed
> 
Previous: Alex RiesenNext: Sam Ravnborg
Message 3 of 4 in “git apply fails to apply a renamed file in a new directory”
  1. Sam RavnborgOct 25, 2007
  2. Alex RiesenOct 25, 2007
  3. Alex RiesenOct 25, 2007
  4. Sam RavnborgOct 25, 2007

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.