Re: [PATCH 1/2] Move the pick_author code to git-sh-setup
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 24, 2007, 07:09 UTC
- Message-ID
- <7vejk125i6.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <7v7ipt3lh6.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > >> - set_author_env=`git show -s --pretty=raw --encoding="$encoding" "$use_commit" | >> - LANG=C LC_ALL=C sed -ne "$pick_author_script"` >> - eval "$set_author_env" >> ... >> + eval $(get_author_ident_from_commit "$use_commit") > > Are you sure about this part of the change? I suspect that you > are losing IFS by not dq'ing the argument you give to the eval. > > ...
If you care about your data in your variable and do not want word-splitting at $IFS to happen, you should always dq your variable. A quick rule of thumb is that the only place that you can get away by not quoting is straight assignment to another variable, like so:
var='a b c '
another=$var ;# another="$var" is fine but unnecessary.