On Tue, Apr 3, 2018 at 11:07 PM, Eric Pruitt <eric.pru...@gmail.com> wrote:
> On Tue, Apr 03, 2018 at 07:55:53PM +0200, Silvan Jegen wrote:
>> I tried the attached patch and it didn't work either. After creating
>> a patch in this repo myself (and googling the error) I realized that
>> your patch didn't have the "a/", resp. "b/" string prefix in the diff
>> filenames. After adding these prefixes by hand (attached), the patch
>> applied for me.
>>
>> How did you generate these patches? It's the first time I had this issue.
>
>     ericpruitt@sinister:~$ cd projects/dwm/
>     ericpruitt@sinister:dwm$ git format-patch HEAD^
>     0001-Make-unset-property-fallback-strings-configurable.patch
>
> However I relatively recently added "noprefix = true" to my Git
> configuration i.e.
>
>     [diff]
>     noprefix = true

I assume this is the culprit. Looking at

https://stackoverflow.com/questions/6764953/what-is-the-reason-for-the-a-b-prefixes-of-git-diff

this option seems to be useful if you use 'patch' instead of git to
apply the patches.


>     algorithm = patience
>
> It seems odd to me that Git would create a broken (or perhaps
> backward-incompatible) patch because of that option. What version of Git
> are you using? I'm running 2.11.0.

I am using 2.16.3 but that shouldn't matter.

> Actually, the patch fails to apply for me, too, so I've completely axed
> that option from my configuration.

Yeah, seems sensible to me. It's good to keep in mind if I encounter a
similar issue in the future though (who am I kidding. I will have
forgotten and will have to look up everything again...)


Cheers,

Silvan

Reply via email to