Re: [Alt. PATCH] format-patch: do not use diff UI config

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

 



Thomas Rast <trast@xxxxxxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]