* git apply fails to apply a renamed file in a new directory
@ 2007-10-25 18:07 Sam Ravnborg
2007-10-25 21:30 ` Alex Riesen
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2007-10-25 18:07 UTC (permalink / raw)
To: git
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
When trying to apply this diff using:
git apply -p1 < .../patch
I noticed that the two defconfig files were deleted as expected,
but the renamed versions did not appear in the arch/x86/configs/
directory.
The configs/ directory did not exist and was not created.
Without looking at git apply I assume that the rename failed because
it is not prepared to rename a file to a directory that does not exist.
Buried in other stuff so I did not take a look myself..
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git apply fails to apply a renamed file in a new directory
2007-10-25 18:07 git apply fails to apply a renamed file in a new directory Sam Ravnborg
@ 2007-10-25 21:30 ` Alex Riesen
2007-10-25 21:35 ` Alex Riesen
0 siblings, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2007-10-25 21:30 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: git
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
>
> When trying to apply this diff using:
> git apply -p1 < .../patch
works here. Don't use -p1, it is assumed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git apply fails to apply a renamed file in a new directory
2007-10-25 21:30 ` Alex Riesen
@ 2007-10-25 21:35 ` Alex Riesen
2007-10-25 21:41 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2007-10-25 21:35 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: git
Alex Riesen, Thu, Oct 25, 2007 23:30:38 +0200:
> 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).
> > When trying to apply this diff using:
> > git apply -p1 < .../patch
>
> works here. Don't use -p1, it is assumed
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git apply fails to apply a renamed file in a new directory
2007-10-25 21:35 ` Alex Riesen
@ 2007-10-25 21:41 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2007-10-25 21:41 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
On Thu, Oct 25, 2007 at 11:35:23PM +0200, Alex Riesen wrote:
> Alex Riesen, Thu, Oct 25, 2007 23:30:38 +0200:
> > 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?
I guess I still have Linus' rename stuff added - will update.
>
> Mine is based off d90a7fda355c251b8ffdd79617fb083c18245ec2
> (builtin-fetch got merged).
>
> > > When trying to apply this diff using:
> > > git apply -p1 < .../patch
> >
> > works here. Don't use -p1, it is assumed
> >
It seems to be a picnic[*] bug - at least I cannot reproduce it.
Sorry for the noise but thanks for testing.
[*] Problem In Chair Not In Computer
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-25 21:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-25 18:07 git apply fails to apply a renamed file in a new directory Sam Ravnborg
2007-10-25 21:30 ` Alex Riesen
2007-10-25 21:35 ` Alex Riesen
2007-10-25 21:41 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).