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

Re: [PATCH 1/2] t9902: verify that completion does not print anything

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 12, 2024, 18:17 UTC
Message-ID
<xmqqedembem7.fsf@gitster.g>
In-Reply-To
<20240112151655.GA640039@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 18 quoted lines
> On Fri, Jan 12, 2024 at 02:12:43PM +0100, Johannes Schindelin wrote:
>
>> But my main concern is: Why does this happen in the first place? If we are
>> running with Bash, why does `BASH_XTRACEFD` to work as intended here and
>> makes it necessary to filter out the traced commands?
>
> BASH_XTRACEFD was introduced in bash 4.1. macOS ships with the ancient
> bash 3.2.57, which is the last GPLv2 version.
>
> One simple solution is to mark the script with test_untraceable. See
> 5fc98e79fc (t: add means to disable '-x' tracing for individual test
> scripts, 2018-02-24) and 5827506928 (t1510-repo-setup: mark as
> untraceable with '-x', 2018-02-24).
>
> That will disable tracing entirely in the script for older versions of
> bash, which could make debugging harder. But it will still work as
> expected for people on reasonable versions of bash, and doesn't
> introduce any complicated code.

Thank you, all three of you, for digging through to the bottom quickly.

I too suspected a version of bash that is ancient and found out about the "untraceable" bit just before I started reading this thread ;-)

Previous: Jeff KingNext: Patrick Steinhardt
Message 8 of 18 in “completion: silence pseudo-ref existence check”
  1. 0/2 completion: silence pseudo-ref existence checkPatrick Steinhardt, Jan 11, 2024
  2. 1/2 t9902: verify that completion does not print anythingPatrick Steinhardt, Jan 11, 2024
  3. Junio C HamanoJan 11, 2024
  4. Johannes SchindelinJan 12, 2024
  5. Patrick SteinhardtJan 12, 2024
  6. Johannes SchindelinJan 12, 2024
  7. Jeff KingJan 12, 2024
  8. Junio C HamanoJan 12, 2024
  9. Patrick SteinhardtJan 15, 2024
  10. 2/2 completion: silence pseudoref existence checkPatrick Steinhardt, Jan 11, 2024
  11. Junio C HamanoJan 11, 2024
  12. SZEDER GáborJan 13, 2024
  13. 0/5 completion: silence pseudo-ref existence checkPatrick Steinhardt, Jan 15, 2024
  14. 1/5 completion: discover repo path in `__git_pseudoref_exists ()`Patrick Steinhardt, Jan 15, 2024
  15. 2/5 t9902: verify that completion does not print anythingPatrick Steinhardt, Jan 15, 2024
  16. 3/5 completion: improve existence check for pseudo-refsPatrick Steinhardt, Jan 15, 2024
  17. 4/5 completion: silence pseudoref existence checkPatrick Steinhardt, Jan 15, 2024
  18. 5/5 completion: treat dangling symrefs as existing pseudorefsPatrick Steinhardt, Jan 15, 2024

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.