git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-sh-setup: fix parseopt `eval`.

From
Pierre Habouzit <madcoder@debian.org>
Date
Nov 8, 2007, 09:14 UTC
Message-ID
<20071108091402.GA7391@artemis.corp>
In-Reply-To
<7vr6j15i3a.fsf@gitster.siamese.dyndns.org>
On Thu, Nov 08, 2007 at 07:09:29AM +0000, Junio C Hamano wrote:
Show 7 quoted lines
> The 'automagic parseopt' support corrupted non option parameters
> that had IFS characters in them.  The worst case can be seen
> when it has a non option parameter like this:
> 
> 	$1=" * some string   blech"
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> -	parseopt_extra=
> -	[ -n "$OPTIONS_KEEPDASHDASH" ] &&
> -		parseopt_extra="$parseopt_extra --keep-dashdash"
> +	[ -n "$OPTIONS_KEEPDASHDASH" ] && parseopt_extra="--keep-dashdash"
  oh and this part is wrong because you're affected by $parseopt_extra
environment poisonning. And you have to fix git-clone.sh that uses
git-rev-parse --parsopt directly with the same call too (as it doesn't
use git-sh-setup).
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Pierre HabouzitNext: Pierre Habouzit
Message 3 of 4 in “git-sh-setup: fix parseopt `eval`.”
  1. git-sh-setup: fix parseopt `eval`.Junio C Hamano, Nov 8, 2007
  2. Pierre HabouzitNov 8, 2007
  3. Pierre HabouzitNov 8, 2007
  4. Pierre HabouzitNov 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.