From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: "Oded Shimon" <ods15@ods15.dyndns.org>, "Jan Krüger" <jk@jk.gs>,
git@vger.kernel.org
Subject: Re: [Alt. PATCH] format-patch: do not use diff UI config
Date: Fri, 10 Sep 2010 09:21:19 -0700 [thread overview]
Message-ID: <7vzkvph8n4.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 2a6b8c51903fd6a22606b8f592b1a2e11ea68741.1284020917.git.trast@student.ethz.ch
Thomas Rast <trast@student.ethz.ch> writes:
> ...
> arguably only diff.renames (and perhaps diff.ignoresubmodules, I don't
> use them) should affect format-patch. Everything else undermines the
> guarantee (by having a consistent format) that format-patch|am works.
We need to be a bit careful here.
Each user must be able to find a combination of ($opts1, $opts2) to make
"format-patch $opts1 | am $opts2" run correctly with his funny settings
(e.g. diff.noprefix). We must guarantee that [*1*].
I however don't think we need to guarantee that the pipeline always works
for empty opts1/2, and certainly we shouldn't insist what flows in that
pipe must be the bog-standard -p1 with a/ b/ prefix patch. For example,
in circles under svn influence, people may prefer opts1=--no-prefix, and
as long as the recipient understands that is the community norm around
there, he can run his "am" with -p0 and everything should work. It is not
unreasonable for the sender to have diff.noprefix in the repository config
in such a setup, don't you think?
There is no way to easily affect what options the "format-patch | am"
pipeline uses inside rebase. It may make sense to introduce --rebasing
option to format-patch to cause it to ignore any funny setting the user
might have, so that we don't have to keep adding options to the command
invocation. "am" has --rebasing already, and it may be beneficial to
teach the codepath to defeat some configuration variables in a similar
way.
[Footnote]
*1* ... within reason. For example, I don't think there is no opts2 if
you had opts1="--src-prefix=a/ --dst-prefix=b/c/" that makes the pipeline
work reasonably.
next prev parent reply other threads:[~2010-09-10 16:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 13:54 [PATCH] Add explicit --src/dst-prefix to git-formt-patch in git-rebase.sh for the case of "diff.noprefix" in git-config Oded Shimon
2010-09-08 20:31 ` ods15
2010-09-08 21:07 ` Jan Krüger
2010-09-09 8:07 ` [PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh Oded Shimon
2010-09-09 8:36 ` [Alt. PATCH] format-patch: do not use diff UI config Thomas Rast
2010-09-09 19:13 ` Sverre Rabbelier
2010-09-09 19:43 ` Jeff King
2010-09-10 16:21 ` Junio C Hamano [this message]
2010-09-09 18:35 ` [PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh Junio C Hamano
2010-09-09 18:49 ` ods15
2010-09-09 18:49 ` Oded Shimon
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=7vzkvph8n4.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jk@jk.gs \
--cc=ods15@ods15.dyndns.org \
--cc=trast@student.ethz.ch \
/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.