{"thread":{"id":"25036","subject":"[PATCH] Add explicit --src/dst-prefix to git-formt-patch in git-rebase.sh for the case of \"diff.noprefix\" in git-config","startedAt":"2010-09-08T13:54:05Z","lastAt":"2010-09-10T16:21:19Z","messageCount":11,"participants":["Oded Shimon","ods15@ods15.dyndns.org","Jan Krüger","Thomas Rast","Junio C Hamano","Sverre Rabbelier","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"150295","messageId":"1283954045-8326-1-git-send-email-ods15@ods15.dyndns.org","threadId":"25036","inReplyTo":null,"subject":"[PATCH] Add explicit --src/dst-prefix to git-formt-patch in git-rebase.sh for the case of \"diff.noprefix\" in git-config","fromName":"Oded Shimon","fromEmail":"ods15@ods15.dyndns.org","sentAt":"2010-09-08T13:54:05Z","receivedAt":"2010-09-08T13:54:05Z","isPatch":true,"sender":{"key":"ods15@ods15.dyndns.org","avatar":null},"body":"---\n git-rebase.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 7508463..e83a0cf 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -565,7 +565,7 @@ fi\n \n if test -z \"$do_merge\"\n then\n-\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream \\\n+\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \\\n \t\t--no-renames $root_flag \"$revisions\" |\n \tgit am $git_am_opt --rebasing --resolvemsg=\"$RESOLVEMSG\" &&\n \tmove_to_original_branch\n-- \n1.6.4.4\n"},{"id":"150323","messageId":"20100908203106.GD4610@crate15.ODS15-HOME","threadId":"25036","inReplyTo":"1283954045-8326-1-git-send-email-ods15@ods15.dyndns.org","subject":"Re: [PATCH] Add explicit --src/dst-prefix to git-formt-patch in git-rebase.sh for the case of \"diff.noprefix\" in git-config","fromName":"","fromEmail":"ods15@ods15.dyndns.org","sentAt":"2010-09-08T20:31:06Z","receivedAt":"2010-09-08T20:31:06Z","isPatch":true,"sender":{"key":"ods15@ods15.dyndns.org","avatar":null},"body":"On Wed, Sep 08, 2010 at 04:54:05PM +0300, Oded Shimon wrote:\n> ---\n>  git-rebase.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-rebase.sh b/git-rebase.sh\n> index 7508463..e83a0cf 100755\n> --- a/git-rebase.sh\n> +++ b/git-rebase.sh\n> @@ -565,7 +565,7 @@ fi\n>  \n>  if test -z \"$do_merge\"\n>  then\n> -\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream \\\n> +\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \\\n>  \t\t--no-renames $root_flag \"$revisions\" |\n>  \tgit am $git_am_opt --rebasing --resolvemsg=\"$RESOLVEMSG\" &&\n>  \tmove_to_original_branch\n\nHi.\n\nI may have rudely just sent a patch without explaining anything, I thought \nthe patch was self explanitory. I'm not sure on the expected procedure \nhere for sending patches.\n\nWhen using \"git rebase\", when \"diff.noprefix\" is set to true in \ngit-config, then all the rebases mess up because they get the directory \npath wrong.\n\nAs far as I can tell, my patch fixes this, with no side-effects that I can \nthink of.\n\nCan anyone comment on the patch? Can it be pushed upstream?\n\n- ods15\n"},{"id":"150324","messageId":"20100908230739.1b8831f1@jk.gs","threadId":"25036","inReplyTo":"1283954045-8326-1-git-send-email-ods15@ods15.dyndns.org","subject":"Re: [PATCH] Add explicit --src/dst-prefix to git-formt-patch in git-rebase.sh for the case of \"diff.noprefix\" in git-config","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2010-09-08T21:07:39Z","receivedAt":"2010-09-08T21:07:39Z","isPatch":true,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"Oded Shimon <ods15@ods15.dyndns.org> wrote:\n\n> ---\n\nA shorter summary (subject) and more of a commit message body might be a\ngood idea. People tend to like patch summaries that fit into one line\non a terminal, and shorter is even better for those tools that output\nadditional fields on the same line.\n\nSignoff is missing, please see Documentation/SubmittingPatches for\ndetails (including the reason why we need one in the first place).\n\nI can't comment on the patch itself since I'm not familiar with the\nwhole diff machinery nor the innards of rebase.\n\n>  git-rebase.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-rebase.sh b/git-rebase.sh\n> index 7508463..e83a0cf 100755\n> --- a/git-rebase.sh\n> +++ b/git-rebase.sh\n> @@ -565,7 +565,7 @@ fi\n>  \n>  if test -z \"$do_merge\"\n>  then\n> -\tgit format-patch -k --stdout --full-index\n> --ignore-if-in-upstream \\\n> +\tgit format-patch -k --stdout --full-index\n> --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \\\n> --no-renames $root_flag \"$revisions\" | git am $git_am_opt --rebasing\n> --resolvemsg=\"$RESOLVEMSG\" && move_to_original_branch\n\n-Jan\n"},{"id":"150356","messageId":"1284019625-14096-1-git-send-email-ods15@ods15.dyndns.org","threadId":"25036","inReplyTo":"1283954045-8326-1-git-send-email-ods15@ods15.dyndns.org","subject":"[PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh","fromName":"Oded Shimon","fromEmail":"ods15@ods15.dyndns.org","sentAt":"2010-09-09T08:07:05Z","receivedAt":"2010-09-09T08:07:05Z","isPatch":true,"sender":{"key":"ods15@ods15.dyndns.org","avatar":null},"body":"For the case of \"diff.noprefix\" in git-config, git-format-patch should\nstill output diff with standard prefixes for git-am\n\nSigned-off-by: Oded Shimon <ods15@ods15.dyndns.org>\n---\n git-rebase.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 7508463..e83a0cf 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -565,7 +565,7 @@ fi\n \n if test -z \"$do_merge\"\n then\n-\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream \\\n+\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \\\n \t\t--no-renames $root_flag \"$revisions\" |\n \tgit am $git_am_opt --rebasing --resolvemsg=\"$RESOLVEMSG\" &&\n \tmove_to_original_branch\n-- \n1.6.4.4\n"},{"id":"150359","messageId":"2a6b8c51903fd6a22606b8f592b1a2e11ea68741.1284020917.git.trast@student.ethz.ch","threadId":"25036","inReplyTo":"1284019625-14096-1-git-send-email-ods15@ods15.dyndns.org","subject":"[Alt. PATCH] format-patch: do not use diff UI config","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-09-09T08:36:54Z","receivedAt":"2010-09-09T08:36:54Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"format-patch read and used the diff UI config, such as diff.renames,\ndiff.noprefix and diff.mnemnoicprefix.  These have a history of\nbreaking rebase and patch application in general; cf. 840b3ca (rebase:\nprotect against diff.renames configuration, 2008-11-10).\n\nInstead of continually putting more options inside git-rebase to avoid\nthese issues, this patch takes the stance that output from\nformat-patch is intended primarily for git-am and only as a side\neffect also for human consumption.  Hence, ignore the diff UI config\nentirely when coming from format-patch.\n\nNote that all existing calls to git_log_config except for the one in\ngit_format_config use a NULL callback.\n\nReported-by: Oded Shimon <ods15@ods15.dyndns.org>\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n\nThis is a bolder approach that just outright ignores the backwards\ncompatibility complaints Junio had in 840b3ca.  Among the variables\nparsed in git_diff_ui_config, namely\n\n  color.diff (and its legacy alias diff.color)\n  diff.renames\n  diff.autorefreshindex\n  diff.mnemonicprefix\n  diff.noprefix\n  diff.external\n  diff.wordregex\n  diff.ignoresubmodules\n\narguably only diff.renames (and perhaps diff.ignoresubmodules, I don't\nuse them) should affect format-patch.  Everything else undermines the\nguarantee (by having a consistent format) that format-patch|am works.\n\nSo now I'm not so sure about diff.renames.  Perhaps it needs to be\nretained, but that requires a special case since we cannot move it to\ngit_diff_basic_config() (which affects diff-* plumbing too).\n\nIn any case I also made a test.  If you decide to go for the original\npatch, please feel free to \"steal\" it.\n\n\n\n builtin/log.c     |   20 ++++++++++++++++++--\n t/t3400-rebase.sh |    7 +++++++\n 2 files changed, 25 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex f2d9d61..a1079fe 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -385,8 +385,19 @@ static int cmd_log_walk(struct rev_info *rev)\n \treturn diff_result_code(&rev->diffopt, 0);\n }\n \n+struct log_config_cb_data\n+{\n+\t/*\n+\t * If no_diff_ui_config is set, we use diff_basic_config\n+\t * instead, ignoring the plumbing-specific UI settings.\n+\t */\n+\tint no_diff_ui_config;\n+};\n+\n static int git_log_config(const char *var, const char *value, void *cb)\n {\n+\tstruct log_config_cb_data *cb_data = cb;\n+\n \tif (!strcmp(var, \"format.pretty\"))\n \t\treturn git_config_string(&fmt_pretty, var, value);\n \tif (!strcmp(var, \"format.subjectprefix\"))\n@@ -406,7 +417,10 @@ static int git_log_config(const char *var, const char *value, void *cb)\n \tif (!prefixcmp(var, \"color.decorate.\"))\n \t\treturn parse_decorate_color_config(var, 15, value);\n \n-\treturn git_diff_ui_config(var, value, cb);\n+\tif (!cb_data || !cb_data->no_diff_ui_config)\n+\t\treturn git_diff_ui_config(var, value, cb);\n+\telse\n+\t\treturn git_diff_basic_config(var, value, cb);\n }\n \n int cmd_whatchanged(int argc, const char **argv, const char *prefix)\n@@ -1099,6 +1113,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \tchar *add_signoff = NULL;\n \tstruct strbuf buf = STRBUF_INIT;\n \tint use_patch_format = 0;\n+\tstruct log_config_cb_data config_cb_data;\n \tconst struct option builtin_format_patch_options[] = {\n \t\t{ OPTION_CALLBACK, 'n', \"numbered\", &numbered, NULL,\n \t\t\t    \"use [PATCH n/m] even with a single patch\",\n@@ -1160,7 +1175,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \textra_hdr.strdup_strings = 1;\n \textra_to.strdup_strings = 1;\n \textra_cc.strdup_strings = 1;\n-\tgit_config(git_format_config, NULL);\n+\tconfig_cb_data.no_diff_ui_config = 1;\n+\tgit_config(git_format_config, &config_cb_data);\n \tinit_revisions(&rev, prefix);\n \trev.commit_format = CMIT_FMT_EMAIL;\n \trev.verbose_header = 1;\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 349eebd..0e2fe71 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -144,6 +144,13 @@ test_expect_success 'rebase is not broken by diff.renames' '\n \tGIT_TRACE=1 git rebase force-3way\n '\n \n+test_expect_success 'rebase is not broken by diff.noprefix' '\n+\tgit config diff.noprefix true &&\n+\ttest_when_finished \"git config --unset diff.noprefix\" &&\n+\tgit checkout -b noprefix side &&\n+\tGIT_TRACE=1 git rebase master\n+'\n+\n test_expect_success 'setup: recover' '\n \ttest_might_fail git rebase --abort &&\n \tgit reset --hard &&\n-- \n1.7.3.rc0.289.gcd076\n"},{"id":"150381","messageId":"7vbp86n4t4.fsf@alter.siamese.dyndns.org","threadId":"25036","inReplyTo":"1284019625-14096-1-git-send-email-ods15@ods15.dyndns.org","subject":"Re: [PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-09T18:35:19Z","receivedAt":"2010-09-09T18:35:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Oded Shimon <ods15@ods15.dyndns.org> writes:\n\n> For the case of \"diff.noprefix\" in git-config, git-format-patch should\n> still output diff with standard prefixes for git-am\n>\n> Signed-off-by: Oded Shimon <ods15@ods15.dyndns.org>\n\nHmm.\n\n> diff --git a/git-rebase.sh b/git-rebase.sh\n> index 7508463..e83a0cf 100755\n> --- a/git-rebase.sh\n> +++ b/git-rebase.sh\n> @@ -565,7 +565,7 @@ fi\n>  \n>  if test -z \"$do_merge\"\n>  then\n> -\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream \\\n> +\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \\\n>  \t\t--no-renames $root_flag \"$revisions\" |\n>  \tgit am $git_am_opt --rebasing --resolvemsg=\"$RESOLVEMSG\" &&\n\nAs the format-patch invocation is already multi-line, you probably would\nwant to use a continuation line with \"\\\" to keep the line length shorter.\n\nWe need to protect ourselves from crazy people, so regrettably something\nlike this patch is unavoidable, albeit unsightly.\n\nThanks.\n"},{"id":"150382","messageId":"20100909184920.GG4610@crate15.ODS15-HOME","threadId":"25036","inReplyTo":"7vbp86n4t4.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh","fromName":"","fromEmail":"ods15@ods15.dyndns.org","sentAt":"2010-09-09T18:49:20Z","receivedAt":"2010-09-09T18:49:20Z","isPatch":true,"sender":{"key":"ods15@ods15.dyndns.org","avatar":null},"body":"On Thu, Sep 09, 2010 at 11:35:19AM -0700, Junio C Hamano wrote:\n> Oded Shimon <ods15@ods15.dyndns.org> writes:\n> \n> > For the case of \"diff.noprefix\" in git-config, git-format-patch should\n> > still output diff with standard prefixes for git-am\n> >\n> > Signed-off-by: Oded Shimon <ods15@ods15.dyndns.org>\n> \n> Hmm.\n\nAnything wrong?\n\n> > diff --git a/git-rebase.sh b/git-rebase.sh\n> > index 7508463..e83a0cf 100755\n> > --- a/git-rebase.sh\n> > +++ b/git-rebase.sh\n> > @@ -565,7 +565,7 @@ fi\n> >  \n> >  if test -z \"$do_merge\"\n> >  then\n> > -\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream \\\n> > +\tgit format-patch -k --stdout --full-index --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \\\n> >  \t\t--no-renames $root_flag \"$revisions\" |\n> >  \tgit am $git_am_opt --rebasing --resolvemsg=\"$RESOLVEMSG\" &&\n> \n> As the format-patch invocation is already multi-line, you probably would\n> want to use a continuation line with \"\\\" to keep the line length shorter.\n\nWill do.\n\n> We need to protect ourselves from crazy people, so regrettably something\n> like this patch is unavoidable, albeit unsightly.\n\nI am one of those crazy people (hence noticing the bug). I constantly copy \npaste the filenames from diffs in order to write them in command line, \nwith mouse double-click which grabs the entire path/filename...\n\n- ods15\n"},{"id":"150383","messageId":"1284058191-15831-1-git-send-email-ods15@ods15.dyndns.org","threadId":"25036","inReplyTo":"7vbp86n4t4.fsf@alter.siamese.dyndns.org","subject":"[PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh","fromName":"Oded Shimon","fromEmail":"ods15@ods15.dyndns.org","sentAt":"2010-09-09T18:49:51Z","receivedAt":"2010-09-09T18:49:51Z","isPatch":true,"sender":{"key":"ods15@ods15.dyndns.org","avatar":null},"body":"For the case of \"diff.noprefix\" in git-config, git-format-patch should\nstill output diff with standard prefixes for git-am\n\nSigned-off-by: Oded Shimon <ods15@ods15.dyndns.org>\n---\n git-rebase.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 7508463..3335cee 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -566,6 +566,7 @@ fi\n if test -z \"$do_merge\"\n then\n \tgit format-patch -k --stdout --full-index --ignore-if-in-upstream \\\n+\t\t--src-prefix=a/ --dst-prefix=b/ \\\n \t\t--no-renames $root_flag \"$revisions\" |\n \tgit am $git_am_opt --rebasing --resolvemsg=\"$RESOLVEMSG\" &&\n \tmove_to_original_branch\n-- \n1.6.4.4\n"},{"id":"150392","messageId":"AANLkTinNJtRUxZTvizVnY9Xe0Yew4s-hnbNtQTKyekd6@mail.gmail.com","threadId":"25036","inReplyTo":"2a6b8c51903fd6a22606b8f592b1a2e11ea68741.1284020917.git.trast@student.ethz.ch","subject":"Re: [Alt. PATCH] format-patch: do not use diff UI config","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-09-09T19:13:13Z","receivedAt":"2010-09-09T19:13:13Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Thu, Sep 9, 2010 at 03:36, Thomas Rast <trast@student.ethz.ch> wrote:\n> +test_expect_success 'rebase is not broken by diff.noprefix' '\n> +       git config diff.noprefix true &&\n> +       test_when_finished \"git config --unset diff.noprefix\" &&\n> +       git checkout -b noprefix side &&\n> +       GIT_TRACE=1 git rebase master\n> +'\n> +\n\nCan we have one for 'git config diff.color true' too?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"150404","messageId":"20100909194323.GA1146@sigill.intra.peff.net","threadId":"25036","inReplyTo":"2a6b8c51903fd6a22606b8f592b1a2e11ea68741.1284020917.git.trast@student.ethz.ch","subject":"Re: [Alt. PATCH] format-patch: do not use diff UI config","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-09-09T19:43:23Z","receivedAt":"2010-09-09T19:43:23Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 09, 2010 at 10:36:54AM +0200, Thomas Rast wrote:\n\n> format-patch read and used the diff UI config, such as diff.renames,\n> diff.noprefix and diff.mnemnoicprefix.  These have a history of\n> breaking rebase and patch application in general; cf. 840b3ca (rebase:\n> protect against diff.renames configuration, 2008-11-10).\n> \n> Instead of continually putting more options inside git-rebase to avoid\n> these issues, this patch takes the stance that output from\n> format-patch is intended primarily for git-am and only as a side\n> effect also for human consumption.  Hence, ignore the diff UI config\n> entirely when coming from format-patch.\n> \n> Note that all existing calls to git_log_config except for the one in\n> git_format_config use a NULL callback.\n\nThis was my first thought upon reading Oded's patch, too. We would want\nto cut out anything that will cause format-patch to create a patch that\ncould not be applied. So from your list:\n\n> This is a bolder approach that just outright ignores the backwards\n> compatibility complaints Junio had in 840b3ca.  Among the variables\n> parsed in git_diff_ui_config, namely\n> \n>   color.diff (and its legacy alias diff.color)\n>   diff.renames\n>   diff.autorefreshindex\n>   diff.mnemonicprefix\n>   diff.noprefix\n>   diff.external\n>   diff.wordregex\n>   diff.ignoresubmodules\n> \n> arguably only diff.renames (and perhaps diff.ignoresubmodules, I don't\n> use them) should affect format-patch.  Everything else undermines the\n> guarantee (by having a consistent format) that format-patch|am works.\n\nI would agree that diff.renames should probably be the only thing we\nwant to allow (because it is not about making a broken diff, but because\nthe receiver may or may not support it, and we already know that\ngit-rebase will handle it).\n\ndiff.external is debatable. If your external diff is producing real,\napplicable diffs, then it is fine to use it. I have to wonder why you\nwould use an external diff, then. I guess because it's faster, or maybe\nhas an algorithm that produces equivalent but easier-to-read results\n(e.g., patience before we had --patience)?\n\n> So now I'm not so sure about diff.renames.  Perhaps it needs to be\n> retained, but that requires a special case since we cannot move it to\n> git_diff_basic_config() (which affects diff-* plumbing too).\n\nI think it is reasonable to just move an explicit \"diff.renames\" check\ninto format_patch, and then set the diff_options appropriately. It\nrequires special case code because it _is_ a special case.\n\n-Peff\n"},{"id":"150450","messageId":"7vzkvph8n4.fsf@alter.siamese.dyndns.org","threadId":"25036","inReplyTo":"2a6b8c51903fd6a22606b8f592b1a2e11ea68741.1284020917.git.trast@student.ethz.ch","subject":"Re: [Alt. PATCH] format-patch: do not use diff UI config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-10T16:21:19Z","receivedAt":"2010-09-10T16:21:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> ...\n> arguably only diff.renames (and perhaps diff.ignoresubmodules, I don't\n> use them) should affect format-patch.  Everything else undermines the\n> guarantee (by having a consistent format) that format-patch|am works.\n\nWe need to be a bit careful here.\n\nEach user must be able to find a combination of ($opts1, $opts2) to make\n\"format-patch $opts1 | am $opts2\" run correctly with his funny settings\n(e.g. diff.noprefix).  We must guarantee that [*1*].\n\nI however don't think we need to guarantee that the pipeline always works\nfor empty opts1/2, and certainly we shouldn't insist what flows in that\npipe must be the bog-standard -p1 with a/ b/ prefix patch.  For example,\nin circles under svn influence, people may prefer opts1=--no-prefix, and\nas long as the recipient understands that is the community norm around\nthere, he can run his \"am\" with -p0 and everything should work.  It is not\nunreasonable for the sender to have diff.noprefix in the repository config\nin such a setup, don't you think?\n\nThere is no way to easily affect what options the \"format-patch | am\"\npipeline uses inside rebase.  It may make sense to introduce --rebasing\noption to format-patch to cause it to ignore any funny setting the user\nmight have, so that we don't have to keep adding options to the command\ninvocation.  \"am\" has --rebasing already, and it may be beneficial to\nteach the codepath to defeat some configuration variables in a similar\nway.\n\n\n[Footnote]\n\n*1* ... within reason.  For example, I don't think there is no opts2 if\nyou had opts1=\"--src-prefix=a/ --dst-prefix=b/c/\" that makes the pipeline\nwork reasonably.\n"}]}