From: Alejandro Colomar <alx.manpages@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Better suggestions when git-am(1) fails
Date: Thu, 9 Mar 2023 11:58:00 +0100 [thread overview]
Message-ID: <82d78a22-76d5-28fd-e87e-e90e9ddc36e1@gmail.com> (raw)
In-Reply-To: <ZAl3bHB9zxjLITgf@coredump.intra.peff.net>
[-- Attachment #1.1: Type: text/plain, Size: 2221 bytes --]
Hi Jeff,
On 3/9/23 07:06, Jeff King wrote:
> On Wed, Mar 08, 2023 at 10:17:11PM -0500, Jeff King wrote:
>
>> 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@coredump.intra.peff.net/
>
> So here's a patch series which I think should help with the sending
> side. Most of it is just filling in gaps in the code and tests for
> current features. Patch 4 is the actual change. Patch 5 adds an
> equivalent option just for format-patch. I'm not convinced anybody
> really wants it (which is why I split it out), but it's probably worth
> doing just in case.
Thanks for the rapid patch set :)
>
> [1/5]: diff: factor out src/dst prefix setup
> [2/5]: t4013: add tests for diff prefix options
> [3/5]: diff: add --default-prefix option
> [4/5]: format-patch: do not respect diff.noprefix
> [5/5]: format-patch: add format.noprefix option
1, 3, and 4 LGTM. I'm not used to your tests, so can't really check
what 2 does without further reading, and I'm not sure 5 is useful.
BTW, I'll probably report a few more things I don't like from
git-am(1)'s error reports, whenever I find them again. ;)
Cheers,
Alex
>
> Documentation/config/format.txt | 7 ++++++
> Documentation/diff-options.txt | 5 ++++
> builtin/log.c | 17 +++++++++++++
> diff.c | 33 ++++++++++++++++++++++----
> diff.h | 2 ++
> t/t4013-diff-various.sh | 42 +++++++++++++++++++++++++++++++++
> t/t4014-format-patch.sh | 16 +++++++++++++
> 7 files changed, 117 insertions(+), 5 deletions(-)
>
> -Peff
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-03-09 11:02 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 20:15 Better suggestions when git-am(1) fails Alejandro Colomar
2023-03-09 3:17 ` Jeff King
2023-03-09 6:06 ` Jeff King
2023-03-09 6:07 ` [PATCH 1/5] diff: factor out src/dst prefix setup Jeff King
2023-03-09 10:50 ` Alejandro Colomar
2023-03-09 6:07 ` [PATCH 2/5] t4013: add tests for diff prefix options Jeff King
2023-03-09 6:09 ` [PATCH 3/5] diff: add --default-prefix option Jeff King
2023-03-09 10:51 ` Alejandro Colomar
2023-03-09 16:31 ` Junio C Hamano
2023-03-10 9:44 ` Jeff King
2023-03-10 17:04 ` Junio C Hamano
2023-03-13 16:43 ` Jeff King
2023-03-13 17:17 ` Junio C Hamano
2023-03-13 17:31 ` Junio C Hamano
2023-03-13 19:54 ` Jeff King
2023-03-09 6:11 ` [PATCH 4/5] format-patch: do not respect diff.noprefix Jeff King
2023-03-09 10:53 ` Alejandro Colomar
2023-03-09 16:41 ` Junio C Hamano
2023-03-10 9:49 ` Jeff King
2023-03-09 6:12 ` [PATCH 5/5] format-patch: add format.noprefix option Jeff King
2023-03-09 17:00 ` Junio C Hamano
2023-03-10 9:51 ` Jeff King
2023-03-09 10:58 ` Alejandro Colomar [this message]
2023-03-09 21:53 ` Better suggestions when git-am(1) fails Junio C Hamano
2023-03-10 9:54 ` Jeff King
2023-03-09 16:22 ` Junio C Hamano
2023-03-10 9:39 ` Jeff King
2023-03-10 16:28 ` Junio C Hamano
2023-03-13 16:37 ` Jeff King
2023-03-13 17:10 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82d78a22-76d5-28fd-e87e-e90e9ddc36e1@gmail.com \
--to=alx.manpages@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.