From: Simon 'corecode' Schubert <hidden> Date: 2016-06-15 22:45:44
We need to play some shell tricks to be able to pass directory names
which contain spaces and/or quotes.
Signed-off-by: Simon 'corecode' Schubert <redacted>
---
Boyd Stephen Smith Jr. wrote:
> I'm thinking your sed line doesn't do what you think it does. You
probably
> want something like:
> bss@monster:~$ echo "don't" | sed -e "s/'/'\\\\''/g"
> don'\''t
Thanks, I clearly did not test this well enough.
git-am.sh | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
@@ -16,6 +16,7 @@ s,signoff add a Signed-off-by line to the commit
message
u,utf8 recode into utf8 (default)
k,keep pass -k flag to git-mailinfo
whitespace= pass it through git-apply
+directory= pass it through git-apply
C= pass it through git-apply
p= pass it through git-apply
resolvemsg= override error message when patch failure occurs
From: Jakub Narebski <hidden> Date: 2016-06-15 22:45:44
Simon 'corecode' Schubert [off-list ref] writes:
quoted hunk
We need to play some shell tricks to be able to pass directory names
which contain spaces and/or quotes.
Signed-off-by: Simon 'corecode' Schubert <redacted>
---
Boyd Stephen Smith Jr. wrote:
> I'm thinking your sed line doesn't do what you think it does.
> You probably want something like:
> bss@monster:~$ echo "don't" | sed -e "s/'/'\\\\''/g"
> don'\''t
Thanks, I clearly did not test this well enough.
git-am.sh | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
@@ -16,6 +16,7 @@ s,signoff add a Signed-off-by line to the commit messageu,utf8recodeintoutf8(default)k,keeppass-kflagtogit-mailinfowhitespace=passitthroughgit-apply+directory=passitthroughgit-apply
Shouldn't it be
+ directory= pass it through git-apply
to have it aligned like the rest of it?
By the way, your patch looks whitespace damaged, although only context
for the above chunk was wrapped...
quoted hunk
C= pass it through git-apply
p= pass it through git-apply
resolvemsg= override error message when patch failure occurs
From: Simon 'corecode' Schubert <hidden> Date: 2016-06-15 22:45:44
Jakub Narebski wrote:
Shouldn't it be
+ directory= pass it through git-apply
to have it aligned like the rest of it?
By the way, your patch looks whitespace damaged, although only context
for the above chunk was wrapped...
Thunderbird must have pummeled it. No clue why it does that though.
Black magic software.
@@ -454,7 +456,7 @@ do case "$resolved" in '')- git apply $git_apply_opt --index "$dotest/patch"+ eval git apply $git_apply_opt --index '"$dotest/patch"'
>
> Why eval?
I quoted the above variable, so I now need to unquote it, that's done by eval.
--
<3 the future +++ RENT this banner advert +++ ASCII Ribbon /"\
rock the past +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
What I need is to convert $2 into a form suitable for quoting, does git
rev-parse --sq do that?
$ git rev-parse --sq -- "don't do that"
'--' 'don'\''t do that'
Without terminating newline. The '--' is needed because otherwise
git-rev-parse expects revisions... and doesn't find any.
By the way you could both simplify option parsing _and_ take care of
proper quoting by using --parseopt, i.e. use git-rev-parse in PARSEOPT
mode. But that is more involved change.
quoted
quoted
@@ -454,7 +456,7 @@ do case "$resolved" in '')- git apply $git_apply_opt --index "$dotest/patch"+ eval git apply $git_apply_opt --index '"$dotest/patch"'
Why eval?
I quoted the above variable, so I now need to unquote it, that's done by eval.