Re: git apply fails to apply a renamed file in a new directory
Sam Ravnborg, Thu, Oct 25, 2007 20:07:37 +0200:
Show 16 quoted lines
> 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