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

Re: Corner case bug caused by shell dependent behavior

From
USUwe Storbeck <uwe@ibr.ch>
Date
Mar 14, 2014, 23:53 UTC
Message-ID
<20140314235300.GA25079@ibr.ch>
In-Reply-To
<20140314003701.GF15625@google.com>
On Mar 13, Jonathan Nieder wrote:
> May we have your sign-off?  (See Documentation/SubmittingPatches
> section "Sign your work" for what this means.

I could have found that myself .. thanks! I'll try to follow it now. :) I'll resend the patch. Hopefully I'll do it right.

> Would it make sense to add this as a test to e.g.
> t/t3404-rebase-interactive.sh?

It's a rather special case, so I'm not sure if it's worth it. I'll send a patch which adds a test for it. The test works for me, but as I don't understand the test mechanisms already good enough a few questions:

- Is it correct to call the fake editor with an empty variable
  FAKE_LINES when you want it to not change the todo list of a
  rebase -i and use it as it is (the work is already done by the
  autosquash option)? I can achieve the same with EDITOR=true.
  What's the preferred way? Is there an advantage to use the fake
  editor also in this case?
- The tests in t3404-rebase-interactive.sh use their variables
  a bit differently, some just set the variables, some export
  the variables and some use a subshell to encapsulate them.
  Also some of the tests reset their rebase state so that
  subsequent tests, which also use rebase, do not fail when the
  rebase fails. Other tests don't do that.
  What's the expected resp. recommended behavior?

While trying to understand the test mechanisms I stumbled over two other problematic uses of echo. These although only affect the test output, not git itself.

Uwe
Previous: Jonathan NiederNext: Jeff King
Message 3 of 5 in “Corner case bug caused by shell dependent behavior”
  1. Uwe StorbeckMar 14, 2014
  2. Jonathan NiederMar 14, 2014
  3. Uwe StorbeckMar 14, 2014
  4. Jeff KingMar 14, 2014
  5. David KastrupMar 14, 2014

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.