All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH] Allow passing of --directory to git-am.
Date: Thu, 04 Dec 2008 23:25:18 +0100	[thread overview]
Message-ID: <493858CE.1030601@fs.ei.tum.de> (raw)
In-Reply-To: <m3hc5jivjo.fsf@localhost.localdomain>

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.

>> @@ -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?

>> +		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   / \

  reply	other threads:[~2008-12-04 22:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 18:48 [PATCH] Allow passing of --directory to git-am Simon 'corecode' Schubert
2008-12-04 18:51 ` Jeff King
2008-12-04 19:27 ` Junio C Hamano
2008-12-04 22:26   ` Simon 'corecode' Schubert
2008-12-04 22:33     ` Junio C Hamano
2008-12-04 23:14       ` Junio C Hamano
2008-12-04 23:36         ` [PATCH - DONTUSE] git-am: propagate -C/-p as well Junio C Hamano
2008-12-04 23:41       ` [PATCH] Allow passing of --directory to git-am Simon 'corecode' Schubert
2008-12-05  0:11         ` Junio C Hamano
2008-12-05  0:16           ` Simon 'corecode' Schubert
2008-12-04 19:35 ` Jakub Narebski
2008-12-04 22:25   ` Simon 'corecode' Schubert [this message]
2008-12-04 22:46     ` Jakub Narebski
  -- strict thread matches above, loose matches on Subject: below --
2008-12-04 17:04 Simon 'corecode' Schubert
2008-12-04 18:28 ` Boyd Stephen Smith Jr.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493858CE.1030601@fs.ei.tum.de \
    --to=corecode@fs.ei.tum.de \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.