Re: Better suggestions when git-am(1) fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 08, 2023 at 09:15:53PM +0100, Alejandro Colomar wrote:

> I had the following error already a few times, when some contributors,
> for some reason unknown to me, remove the leading path components from
> the patch.

The reason is probably that they have set diff.noprefix in their config,
and git-format-patch respects that. Which is arguably a bug. There's a
little discussion in this message, along with references to some
previous discussions:

  https://lore.kernel.org/git/ZAWnDUkgO5clf6qu@xxxxxxxxxxxxxxxxxxxxxxx/

> Now I know that the fix is to use -p0, but the first times it wasn't
> obvious.  And still I forget about -p0 sometimes and it's hard to find
> in the manual pages.  I think it would be good to suggest using it
> when such an error appears.

I agree it may be reasonable to have "git am" be more helpful on the
receiving side. Hopefully if format-patch is changed then you wouldn't
see the situation as often, but it could still happen.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux