Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Allow passing of --directory to git-am.

From: Boyd Stephen Smith Jr. <hidden>
Date: 2016-06-15 22:45:44

On Thursday 04 December 2008, Simon 'corecode' Schubert 
[off-list ref] wrote about '[PATCH] Allow passing of --directory 
to git-am.':
-	--whitespace)
-		git_apply_opt="$git_apply_opt $1=$2"; shift ;;
+	--whitespace|--directory)
+		quot=$(echo "$2" | sed -e "s/'/\\'/g")
+		git_apply_opt="$git_apply_opt $1='$quot'"; shift ;;
Test:
bss@monster:~$ echo "don't" | sed -e "s/'/\\'/g"
don't
bss@monster:~$

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
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help