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

Re: syntax error in git-rebase while running t34* tests

From
Junio C Hamano <gitster@pobox.com>
Date
May 10, 2016, 19:11 UTC
Message-ID
<xmqq60ulpw1s.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CALR6jEiF9Ooi1f0O3KG0wYmN0KRWBQTNarXx79-wBD2E-8q2jA@mail.gmail.com>
Armin Kunaschik <megabreit@googlemail.com> writes:
> I fail to see why eval is really necessary here.

It is necessary to work correctly with any strategy option with $IFS in it, I would think. The calling script "git-rebase" accumulates --strategy-option values after passing each of them through "rev-parse --sq-quote" for that reason.

which means that eval'ed string here:
Show 6 quoted lines
> My quick and dirty hotfix is to place a
> test -n "$strategy_opts" &&
> in front of the eval.
> The tests run fine after this change.
>
> What do you think?

I do not see why "test -n &&" is necessary here, and would be very hesitant to accept a change that nobody understands why it works.

Previous: Armin KunaschikNext: Jeff King
Message 2 of 7 in “syntax error in git-rebase while running t34* tests”
  1. Armin KunaschikMay 10, 2016
  2. Junio C HamanoMay 10, 2016
  3. Jeff KingMay 10, 2016
  4. Junio C HamanoMay 10, 2016
  5. Jeff KingMay 10, 2016
  6. Johannes SchindelinMay 11, 2016
  7. Jeff KingMay 11, 2016

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.