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, 08:15 UTC
Message-ID
<20071108081556.GB6528@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:
> 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:

hu sorry about that, I should have put "" around the ``. I knew it also but it slipped my mind too. I believe this works as well:

eval "$(echo "$OPTIONS_SPEC" | git rev-parse --parseopt $parseopt_extra -- "$@" || echo exit $?)"

I like it better because you will then exit with an exit 129 wich is what we want (and what I documented would work too :P)

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Junio C HamanoNext: Pierre Habouzit
Message 2 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.