{"thread":{"id":"16598","subject":"[PATCH] Allow passing of --directory to git-am.","startedAt":"2008-12-04T18:48:50Z","lastAt":"2008-12-05T00:16:09Z","messageCount":13,"participants":["Simon 'corecode' Schubert","Jeff King","Junio C Hamano","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"97159","messageId":"49382612.3010207@fs.ei.tum.de","threadId":"16598","inReplyTo":null,"subject":"[PATCH] Allow passing of --directory to git-am.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2008-12-04T18:48:50Z","receivedAt":"2008-12-04T18:48:50Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"We need to play some shell tricks to be able to pass directory names\nwhich contain spaces and/or quotes.\n\nSigned-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>\n---\n\nBoyd Stephen Smith Jr. wrote:\n > I'm thinking your sed line doesn't do what you think it does.  You \nprobably\n > want something like:\n > bss@monster:~$ echo \"don't\" | sed -e \"s/'/'\\\\\\\\''/g\"\n > don'\\''t\n\nThanks, I clearly did not test this well enough.\n\n  git-am.sh |    8 +++++---\n  1 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex aa60261..3baff4e 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -16,6 +16,7 @@ s,signoff       add a Signed-off-by line to the commit \nmessage\n  u,utf8          recode into utf8 (default)\n  k,keep          pass -k flag to git-mailinfo\n  whitespace=     pass it through git-apply\n+directory=      pass it through git-apply\n  C=              pass it through git-apply\n  p=              pass it through git-apply\n  resolvemsg=     override error message when patch failure occurs\n@@ -155,8 +156,9 @@ do\n  \t\t;;\n  \t--resolvemsg)\n  \t\tshift; resolvemsg=$1 ;;\n-\t--whitespace)\n-\t\tgit_apply_opt=\"$git_apply_opt $1=$2\"; shift ;;\n+\t--whitespace|--directory)\n+\t\tquot=$(echo \"$2\" | sed -e \"s/'/'\\\\\\''/g\")\n+\t\tgit_apply_opt=\"$git_apply_opt $1='$quot'\"; shift ;;\n  \t-C|-p)\n  \t\tgit_apply_opt=\"$git_apply_opt $1$2\"; shift ;;\n  \t--)\n@@ -454,7 +456,7 @@ do\n\n  \tcase \"$resolved\" in\n  \t'')\n-\t\tgit apply $git_apply_opt --index \"$dotest/patch\"\n+\t\teval git apply $git_apply_opt --index '\"$dotest/patch\"'\n  \t\tapply_status=$?\n  \t\t;;\n  \tt)\n-- \n1.6.1.rc1.45.g123ed.dirty\n"},{"id":"97160","messageId":"20081204185138.GA24858@coredump.intra.peff.net","threadId":"16598","inReplyTo":"49382612.3010207@fs.ei.tum.de","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-12-04T18:51:38Z","receivedAt":"2008-12-04T18:51:38Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Dec 04, 2008 at 07:48:50PM +0100, Simon 'corecode' Schubert wrote:\n\n> Boyd Stephen Smith Jr. wrote:\n> > I'm thinking your sed line doesn't do what you think it does.  You  \n> probably\n> > want something like:\n> > bss@monster:~$ echo \"don't\" | sed -e \"s/'/'\\\\\\\\''/g\"\n> > don'\\''t\n>\n> Thanks, I clearly did not test this well enough.\n\nMaybe it would be a good idea to add a test to the test script, then?\n\n-Peff\n"},{"id":"97163","messageId":"7vhc5jeo60.fsf@gitster.siamese.dyndns.org","threadId":"16598","inReplyTo":"49382612.3010207@fs.ei.tum.de","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-04T19:27:35Z","receivedAt":"2008-12-04T19:27:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n\n> We need to play some shell tricks to be able to pass directory names\n> which contain spaces and/or quotes.\n\nThere already was an earlier attempt for this feature by Kevin Ballard,\nwhich had issues I pointed out:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/94335/focus=94456\n\nThe patch was carried for a few weeks in 'pu' but was dropped due to lack\nof follow-up updates.\n\nDoes your version address the issues Kevin's one had?\n"},{"id":"97164","messageId":"m3hc5jivjo.fsf@localhost.localdomain","threadId":"16598","inReplyTo":"49382612.3010207@fs.ei.tum.de","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-12-04T19:35:41Z","receivedAt":"2008-12-04T19:35:41Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n\n> We need to play some shell tricks to be able to pass directory names\n> which contain spaces and/or quotes.\n> \n> Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>\n> ---\n> \n> Boyd Stephen Smith Jr. wrote:\n>  > I'm thinking your sed line doesn't do what you think it does.\n>  > You probably want something like:\n>  > bss@monster:~$ echo \"don't\" | sed -e \"s/'/'\\\\\\\\''/g\"\n>  > don'\\''t\n> \n> Thanks, I clearly did not test this well enough.\n> \n>   git-am.sh |    8 +++++---\n>   1 files changed, 5 insertions(+), 3 deletions(-)\n> \n> diff --git a/git-am.sh b/git-am.sh\n> index aa60261..3baff4e 100755\n> --- a/git-am.sh\n> +++ b/git-am.sh\n> @@ -16,6 +16,7 @@ s,signoff       add a Signed-off-by line to the commit message\n>   u,utf8          recode into utf8 (default)\n>   k,keep          pass -k flag to git-mailinfo\n>   whitespace=     pass it through git-apply\n> +directory=      pass it through git-apply\n\nShouldn't it be\n\n+ directory=      pass it through git-apply\n\nto have it aligned like the rest of it?\n\nBy the way, your patch looks whitespace damaged, although only context\nfor the above chunk was wrapped...\n\n>   C=              pass it through git-apply\n>   p=              pass it through git-apply\n>   resolvemsg=     override error message when patch failure occurs\n> @@ -155,8 +156,9 @@ do\n>   \t\t;;\n>   \t--resolvemsg)\n>   \t\tshift; resolvemsg=$1 ;;\n> -\t--whitespace)\n> -\t\tgit_apply_opt=\"$git_apply_opt $1=$2\"; shift ;;\n> +\t--whitespace|--directory)\n> +\t\tquot=$(echo \"$2\" | sed -e \"s/'/'\\\\\\''/g\")\n\nWhy not simply use \"git rev-parse --sq\"?\n\n> +\t\tgit_apply_opt=\"$git_apply_opt $1='$quot'\"; shift ;;\n>   \t-C|-p)\n>   \t\tgit_apply_opt=\"$git_apply_opt $1$2\"; shift ;;\n>   \t--)\n> @@ -454,7 +456,7 @@ do\n> \n>   \tcase \"$resolved\" in\n>   \t'')\n> -\t\tgit apply $git_apply_opt --index \"$dotest/patch\"\n> +\t\teval git apply $git_apply_opt --index '\"$dotest/patch\"'\n\nWhy eval?\n\n>   \t\tapply_status=$?\n>   \t\t;;\n>   \tt)\n> -- \n> 1.6.1.rc1.45.g123ed.dirty\n\nHmmm... \n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"97174","messageId":"493858CE.1030601@fs.ei.tum.de","threadId":"16598","inReplyTo":"m3hc5jivjo.fsf@localhost.localdomain","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2008-12-04T22:25:18Z","receivedAt":"2008-12-04T22:25:18Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"Jakub Narebski wrote:\n> Shouldn't it be\n> \n> + directory=      pass it through git-apply\n> \n> to have it aligned like the rest of it?\n> \n> By the way, your patch looks whitespace damaged, although only context\n> for the above chunk was wrapped...\n\nThunderbird must have pummeled it.  No clue why it does that though. \nBlack magic software.\n\n>> @@ -155,8 +156,9 @@ do\n>>   \t\t;;\n>>   \t--resolvemsg)\n>>   \t\tshift; resolvemsg=$1 ;;\n>> -\t--whitespace)\n>> -\t\tgit_apply_opt=\"$git_apply_opt $1=$2\"; shift ;;\n>> +\t--whitespace|--directory)\n>> +\t\tquot=$(echo \"$2\" | sed -e \"s/'/'\\\\\\''/g\")\n> \n> Why not simply use \"git rev-parse --sq\"?\n\nWhat I need is to convert $2 into a form suitable for quoting, does git \nrev-parse --sq do that?\n\n>> +\t\tgit_apply_opt=\"$git_apply_opt $1='$quot'\"; shift ;;\n>>   \t-C|-p)\n>>   \t\tgit_apply_opt=\"$git_apply_opt $1$2\"; shift ;;\n>>   \t--)\n>> @@ -454,7 +456,7 @@ do\n>>\n>>   \tcase \"$resolved\" in\n>>   \t'')\n>> -\t\tgit apply $git_apply_opt --index \"$dotest/patch\"\n>> +\t\teval git apply $git_apply_opt --index '\"$dotest/patch\"'\n >\n > Why eval?\n\nI quoted the above variable, so I now need to unquote it, that's done by eval.\n\n-- \n   <3 the future  +++  RENT this banner advert  +++   ASCII Ribbon   /\"\\\n   rock the past  +++  space for low €€€ NOW!1  +++     Campaign     \\ /\nParty Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \\\nDude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \\\n"},{"id":"97175","messageId":"49385908.5020202@fs.ei.tum.de","threadId":"16598","inReplyTo":"7vhc5jeo60.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2008-12-04T22:26:16Z","receivedAt":"2008-12-04T22:26:16Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n> \n>> We need to play some shell tricks to be able to pass directory names\n>> which contain spaces and/or quotes.\n> \n> There already was an earlier attempt for this feature by Kevin Ballard,\n> which had issues I pointed out:\n> \n>   http://thread.gmane.org/gmane.comp.version-control.git/94335/focus=94456\n> \n> The patch was carried for a few weeks in 'pu' but was dropped due to lack\n> of follow-up updates.\n> \n> Does your version address the issues Kevin's one had?\n\nYou mean not storing/restoring the flags across an invocation?  No, that's \na different thing.  My patch only adds the --directory option, it does not \nfix the previously existing bug.\n\ncheers\n   simon\n\n-- \n   <3 the future  +++  RENT this banner advert  +++   ASCII Ribbon   /\"\\\n   rock the past  +++  space for low €€€ NOW!1  +++     Campaign     \\ /\nParty Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \\\nDude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \\\n"},{"id":"97177","messageId":"7v7i6fd0zt.fsf@gitster.siamese.dyndns.org","threadId":"16598","inReplyTo":"49385908.5020202@fs.ei.tum.de","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-04T22:33:26Z","receivedAt":"2008-12-04T22:33:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n\n> You mean not storing/restoring the flags across an invocation?  No,\n> that's a different thing.  My patch only adds the --directory option,\n> it does not fix the previously existing bug.\n\nThe question is if it _introduces_ a bug that the directory given in the\ninitial invocation of \"git am --directory=foo\" is lost if an patch does\nnot apply and you need to manually resolve and continue.\n\nIf it does not introduce such a bug, you do not have the same issue as the\nold patch.  Otherwise you have the same issue as the old patch.  The\nquestion was if you have the same issue or you don't.  Yes?  No?\n"},{"id":"97178","messageId":"200812042346.33496.jnareb@gmail.com","threadId":"16598","inReplyTo":"493858CE.1030601@fs.ei.tum.de","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-12-04T22:46:31Z","receivedAt":"2008-12-04T22:46:31Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Simon 'corecode' Schubert wrote:\n> Jakub Narebski wrote:\n>> Simon 'corecode' Schubert wrote:\n \n>>> @@ -155,8 +156,9 @@ do\n>>>   \t\t;;\n>>>   \t--resolvemsg)\n>>>   \t\tshift; resolvemsg=$1 ;;\n>>> -\t--whitespace)\n>>> -\t\tgit_apply_opt=\"$git_apply_opt $1=$2\"; shift ;;\n>>> +\t--whitespace|--directory)\n>>> +\t\tquot=$(echo \"$2\" | sed -e \"s/'/'\\\\\\''/g\")\n>> \n>> Why not simply use \"git rev-parse --sq\"?\n> \n> What I need is to convert $2 into a form suitable for quoting, does git \n> rev-parse --sq do that?\n\n  $ git rev-parse --sq -- \"don't do that\"\n  '--' 'don'\\''t do that'\n\nWithout terminating newline. The '--' is needed because otherwise\ngit-rev-parse expects revisions... and doesn't find any.\n \nBy the way you could both simplify option parsing _and_ take care of\nproper quoting by using --parseopt, i.e. use git-rev-parse in PARSEOPT\nmode. But that is more involved change.\n\n>>> @@ -454,7 +456,7 @@ do\n>>>\n>>>   \tcase \"$resolved\" in\n>>>   \t'')\n>>> -\t\tgit apply $git_apply_opt --index \"$dotest/patch\"\n>>> +\t\teval git apply $git_apply_opt --index '\"$dotest/patch\"'\n>>\n>> Why eval?\n> \n> I quoted the above variable, so I now need to unquote it, that's done by eval.\n\nAh.\n-- \nJakub Narebski\nPoland\n"},{"id":"97179","messageId":"7vy6yvbki6.fsf@gitster.siamese.dyndns.org","threadId":"16598","inReplyTo":"7v7i6fd0zt.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-04T23:14:57Z","receivedAt":"2008-12-04T23:14:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n>\n>> You mean not storing/restoring the flags across an invocation?  No,\n>> that's a different thing.  My patch only adds the --directory option,\n>> it does not fix the previously existing bug.\n>\n> The question is if it _introduces_ a bug that the directory given in the\n> initial invocation of \"git am --directory=foo\" is lost if an patch does\n> not apply and you need to manually resolve and continue.\n>\n> If it does not introduce such a bug, you do not have the same issue as the\n> old patch.  Otherwise you have the same issue as the old patch.  The\n> question was if you have the same issue or you don't.  Yes?  No?\n\nI think this fixes the --whitespace=* one, although I obviously haven't\ntried to use it myself extensively.\n\nThe third hunk is just a style fix.  \"am\" is written in a quite old\nfashioned way.\n\n-- >8 --\nSubject: [PATCH] git-am --whitespace: do not lose the command line option\n\nWhen you start \"git am --whitespace=fix\" and the patch application process\nis interrupted by an unapplicable patch early in the series, after\nfixing the offending patch, the remainder of the patch should be processed\nstill with --whitespace=fix when restarted with \"git am --resolved\".\n\nThe commit 67dad68 (add -C[NUM] to git-am, 2007-02-08) broke this long\ntime ago.  This should fix it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-am.sh |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex aa60261..1bf70d4 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -121,7 +121,7 @@ It does not apply to blobs recorded in its index.\"\n \n prec=4\n dotest=\"$GIT_DIR/rebase-apply\"\n-sign= utf8=t keep= skip= interactive= resolved= rebasing= abort=\n+sign= utf8=t keep= skip= interactive= resolved= rebasing= abort= ws=\n resolvemsg= resume=\n git_apply_opt=\n \n@@ -156,7 +156,7 @@ do\n \t--resolvemsg)\n \t\tshift; resolvemsg=$1 ;;\n \t--whitespace)\n-\t\tgit_apply_opt=\"$git_apply_opt $1=$2\"; shift ;;\n+\t\tws=\"--whitespace=$2\"; shift ;;\n \t-C|-p)\n \t\tgit_apply_opt=\"$git_apply_opt $1$2\"; shift ;;\n \t--)\n@@ -283,7 +283,7 @@ if test \"$(cat \"$dotest/keep\")\" = t\n then\n \tkeep=-k\n fi\n-ws=`cat \"$dotest/whitespace\"`\n+ws=$(cat \"$dotest/whitespace\")\n if test \"$(cat \"$dotest/sign\")\" = t\n then\n \tSIGNOFF=`git var GIT_COMMITTER_IDENT | sed -e '\n@@ -454,7 +454,7 @@ do\n \n \tcase \"$resolved\" in\n \t'')\n-\t\tgit apply $git_apply_opt --index \"$dotest/patch\"\n+\t\tgit apply $git_apply_opt $ws --index \"$dotest/patch\"\n \t\tapply_status=$?\n \t\t;;\n \tt)\n-- \n1.6.1.rc1.60.g1d1d7\n"},{"id":"97180","messageId":"7vmyfbbjir.fsf_-_@gitster.siamese.dyndns.org","threadId":"16598","inReplyTo":"7vy6yvbki6.fsf@gitster.siamese.dyndns.org","subject":"[PATCH - DONTUSE] git-am: propagate -C/-p as well","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-04T23:36:12Z","receivedAt":"2008-12-04T23:36:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I think this fixes the --whitespace=* one, although I obviously haven't\n> tried to use it myself extensively.\n\nThis one comes on top of it *if* you want to propagate -C/-p as well, but\nI think it might be a wrong idea to propagate these to begin with.\n\nJust like --3way is a one-shot option to deal with a single unapplicable\npatch (because it was based on an old version) in the whole series, and is\ndesigned not to get propagated, I suspect that people use -C<n> to fix a\nsingle broken patch and they may expect it not to apply to the whole\nseries.\n\nThe breakage --whitespace deals with is an attribute of the submitter (use\nof a broken editor and lack of diligence).  You most often feed a single\nseries from the same submitter in the same mbox to \"git am\", preserving\nthe --whitespace=fix option during the same \"am\" run makes sense, and\nsomewhat more importantly, even though the option indeed modifies what you\nreceived, the change the option causes and the risk of breaking the\nsemantics of the patch is minimum.  I am not sure the breakage --3way\ndeals with falls into the exactly the same category, but it is similar (if\nthe first patch in the series was based on an old version, it is very\nlikely that the subsequent ones are also based on the same old version).\nSo after all it might be better to propagate --3way as well (which this\npatch does not do).\n\nIf we decide that propagating --3way is a good thing, then it would be\nequally good to propagate -C, -p and --directory options.\n\nI dunno.\n\n git-am.sh |   14 ++++++--------\n 1 files changed, 6 insertions(+), 8 deletions(-)\n\ndiff --git c/git-am.sh w/git-am.sh\nindex 1bf70d4..a35e07a 100755\n--- c/git-am.sh\n+++ w/git-am.sh\n@@ -121,7 +121,7 @@ It does not apply to blobs recorded in its index.\"\n \n prec=4\n dotest=\"$GIT_DIR/rebase-apply\"\n-sign= utf8=t keep= skip= interactive= resolved= rebasing= abort= ws=\n+sign= utf8=t keep= skip= interactive= resolved= rebasing= abort=\n resolvemsg= resume=\n git_apply_opt=\n \n@@ -155,9 +155,7 @@ do\n \t\t;;\n \t--resolvemsg)\n \t\tshift; resolvemsg=$1 ;;\n-\t--whitespace)\n-\t\tws=\"--whitespace=$2\"; shift ;;\n-\t-C|-p)\n+\t-C|-p|--whitespace)\n \t\tgit_apply_opt=\"$git_apply_opt $1$2\"; shift ;;\n \t--)\n \t\tshift; break ;;\n@@ -247,10 +245,10 @@ else\n \t\texit 1\n \t}\n \n-\t# -s, -u, -k and --whitespace flags are kept for the\n-\t# resuming session after a patch failure.\n+\t# -s, -u, -k, --whitespace, -C and -p flags are kept\n+\t# for the resuming session after a patch failure.\n \t# -3 and -i can and must be given when resuming.\n-\techo \" $ws\" >\"$dotest/whitespace\"\n+\techo \" $git_apply_opt\" >\"$dotest/apply_opt_extra\"\n \techo \"$sign\" >\"$dotest/sign\"\n \techo \"$utf8\" >\"$dotest/utf8\"\n \techo \"$keep\" >\"$dotest/keep\"\n@@ -283,7 +281,7 @@ if test \"$(cat \"$dotest/keep\")\" = t\n then\n \tkeep=-k\n fi\n-ws=$(cat \"$dotest/whitespace\")\n+apply_opt_extra=$(cat \"$dotest/apply_opt_extra\")\n if test \"$(cat \"$dotest/sign\")\" = t\n then\n \tSIGNOFF=`git var GIT_COMMITTER_IDENT | sed -e '\n"},{"id":"97181","messageId":"49386ABE.2050404@fs.ei.tum.de","threadId":"16598","inReplyTo":"7v7i6fd0zt.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2008-12-04T23:41:50Z","receivedAt":"2008-12-04T23:41:50Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n> \n>> You mean not storing/restoring the flags across an invocation?  No,\n>> that's a different thing.  My patch only adds the --directory option,\n>> it does not fix the previously existing bug.\n> \n> The question is if it _introduces_ a bug that the directory given in the\n> initial invocation of \"git am --directory=foo\" is lost if an patch does\n> not apply and you need to manually resolve and continue.\n> \n> If it does not introduce such a bug, you do not have the same issue as the\n> old patch.  Otherwise you have the same issue as the old patch.  The\n> question was if you have the same issue or you don't.  Yes?  No?\n\nYes, that's the issue.  In this regard it behaves bug-compatible with the \n-p and -C options.\n\n-- \n   <3 the future  +++  RENT this banner advert  +++   ASCII Ribbon   /\"\\\n   rock the past  +++  space for low €€€ NOW!1  +++     Campaign     \\ /\nParty Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \\\nDude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \\\n"},{"id":"97183","messageId":"7viqpzbhvr.fsf@gitster.siamese.dyndns.org","threadId":"16598","inReplyTo":"49386ABE.2050404@fs.ei.tum.de","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-05T00:11:36Z","receivedAt":"2008-12-05T00:11:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n\n> Junio C Hamano wrote:\n>> Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:\n>>\n>>> You mean not storing/restoring the flags across an invocation?  No,\n>>> that's a different thing.  My patch only adds the --directory option,\n>>> it does not fix the previously existing bug.\n>>\n>> The question is if it _introduces_ a bug that the directory given in the\n>> initial invocation of \"git am --directory=foo\" is lost if an patch does\n>> not apply and you need to manually resolve and continue.\n>>\n>> If it does not introduce such a bug, you do not have the same issue as the\n>> old patch.  Otherwise you have the same issue as the old patch.  The\n>> question was if you have the same issue or you don't.  Yes?  No?\n>\n> Yes, that's the issue.  In this regard it behaves bug-compatible with\n> the -p and -C options.\n\nIf that is the case, and assuming that propagating -C/-p would be a good\nidea (which I am not sure yet), the patch I sent out earlier (which was\nflawed somewhat; it should use \"$git_apply_opt_extra\" where it invokes the\n\"git apply\" command) with necessary fix would serve as the basis to\nimplement --directory=<dir>?\n"},{"id":"97184","messageId":"493872C9.9060600@fs.ei.tum.de","threadId":"16598","inReplyTo":"7viqpzbhvr.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Allow passing of --directory to git-am.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2008-12-05T00:16:09Z","receivedAt":"2008-12-05T00:16:09Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> If that is the case, and assuming that propagating -C/-p would be a good\n> idea (which I am not sure yet), the patch I sent out earlier (which was\n> flawed somewhat; it should use \"$git_apply_opt_extra\" where it invokes the\n> \"git apply\" command) with necessary fix would serve as the basis to\n> implement --directory=<dir>?\n\ncertainly.  I'll be travelling, so don't expect anything real soon, will \nresubmit unless I forget.\n\n-- \n   <3 the future  +++  RENT this banner advert  +++   ASCII Ribbon   /\"\\\n   rock the past  +++  space for low €€€ NOW!1  +++     Campaign     \\ /\nParty Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \\\nDude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \\\n"}]}