All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Laurent Arnoud <laurent@spkdev.net>
Subject: Re: [PATCH] format-patch: generate valid patch with diff.noprefix config
Date: Tue, 02 Jun 2020 15:09:36 -0700	[thread overview]
Message-ID: <xmqqeeqxrufz.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <xmqqpnahrx2y.fsf@gitster.c.googlers.com> (Junio C. Hamano's message of "Tue, 02 Jun 2020 14:12:37 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Laurent Arnoud <laurent@spkdev.net> writes:
>
>> With diff.noprefix enabled the patch generated with format-patch does not
>> include prefix a/ and b/ so not applicable with `git am`.
>
> Some projects (not this one) do not want to see a/ and b/ prefix in
> their patches, and noprefix is an option for those who needs to give
> patches to such projects.  As "am" can be told with -p<num> to accept
> such a patch just fine, I do not think this change is appropriate.
>
>> Solution is to force a_prefix and b_prefix on diffopt.
>
> Sorry, I do not think there is any problem to be solved here ;-)

Having said all that, we seem to be letting more configurations for
the diff.* family to affect the format-patch command.  The latest
addition was "diff.relative"---together with the "diff.noprefix"
that triggered this thread, some users may feel that it is a bug to
allow these configuration variables to affect the output from the
"log -p", "show", and "format-patch" commands.  

It *might* make sense to introduce log.diff.* configuration
variables so that when they are set, they are used by
log/show/format-patch instead of diff.* counterparts, or something
along those lines.  I dunno.


  parent reply	other threads:[~2020-06-02 22:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 20:49 [PATCH] format-patch: generate valid patch with diff.noprefix config Laurent Arnoud
2020-06-02 21:12 ` Junio C Hamano
2020-06-02 21:33   ` Laurent Arnoud
2020-06-02 22:09   ` Junio C Hamano [this message]
2020-06-04 19:32     ` Laurent Arnoud
2020-06-04 20:18       ` Junio C Hamano
2020-06-04 23:26         ` Đoàn Trần Công Danh

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=xmqqeeqxrufz.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=laurent@spkdev.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.