Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2023 21:34:50 +0100
From:      Yuri <yuri@aetern.org>
To:        Graham Perrin <grahamperrin@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: git-apply(1): error: content/en/ports/_index.adoc: No such file or directory
Message-ID:  <634f894e-02a7-6a03-c28b-c1cc5f4a1402@aetern.org>
In-Reply-To: <670cff73-a3e6-8501-b33c-df358149adb7@freebsd.org>
References:  <670cff73-a3e6-8501-b33c-df358149adb7@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Graham Perrin wrote:
> Can anyone explain what's below?
> 
> The .diff is downloaded from <https://reviews.freebsd.org/D38510>.
> 
> 
> % file /usr/doc/website/content/en/ports/_index.adoc
> /usr/doc/website/content/en/ports/_index.adoc: ASCII text
> % git -C /usr/doc apply -v /tmp/D38510.diff
> Checking patch content/en/ports/_index.adoc...
> error: content/en/ports/_index.adoc: No such file or directory
> % head -n 8 /tmp/D38510.diff
> Index: website/content/en/ports/_index.adoc
> ===================================================================
> --- website/content/en/ports/_index.adoc
> +++ website/content/en/ports/_index.adoc
> @@ -11,21 +11,20 @@
> 
> '''''
> 
> %
> 

The default value for stripping leading path components is 1, as usually
the diff looks like:

--- a/path/to/file
+++ b/path/to/file

...and it's not there in the diff you are trying to apply.

IOW, try specifying -p0.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?634f894e-02a7-6a03-c28b-c1cc5f4a1402>