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

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

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.
quoted
@@ -155,8 +156,9 @@ do
  		;;
  	--resolvemsg)
  		shift; resolvemsg=$1 ;;
-	--whitespace)
-		git_apply_opt="$git_apply_opt $1=$2"; shift ;;
+	--whitespace|--directory)
+		quot=$(echo "$2" | sed -e "s/'/'\\\''/g")
Why not simply use "git rev-parse --sq"?
What I need is to convert $2 into a form suitable for quoting, does git 
rev-parse --sq do that?
quoted
+		git_apply_opt="$git_apply_opt $1='$quot'"; shift ;;
  	-C|-p)
  		git_apply_opt="$git_apply_opt $1$2"; shift ;;
  	--)
@@ -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   / \
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help