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

Re: [PATCH v2] trace2: prevent segfault on config collection where no value specified

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Jan 23, 2025, 17:01 UTC
Message-ID
<CALnO6CDH1aQrq0tcvr4rEGukksYv5bJ9W4icqBUC2Z3AyixRUw@mail.gmail.com>
In-Reply-To
<xmqqbjvyww3j.fsf@gitster.g>
On Wed, Jan 22, 2025 at 1:18 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
>
> Junio C Hamano <gitster@pobox.com> writes:
>
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> >
> >>
> >> This patch looks good to me!
> >
> > Thanks.  As I punted on reviewing the tgt_perf part, it is very good
> > to see somebody else step in to look it over.
> >
> > Will queue.
>
> The test part used broken indentation and also the use of
> test_when_finished was careless, so I'll touch it up before queuing.
>
> No need to resend.
>
> Thanks.
>

I was curious what changed, so I found 792a3850fa (trace2: prevent segfault on config collection with valueless true, 2025-01-10) and I noticed this:

-       redacted = redact_arg(value);
+       redacted = value ? redact_arg(value): NULL;

I think I expected (based on Documentation/CodingGuidelines) a space before the ternary conditional's colon. Then again, "git grep '?.*[^ ]:' *.[ch]" finds a few other cases with the unspaced style.

-- 
D. Ben Knoble
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 11 in “trace2: prevent segfault on config collection where no value specified”
  1. trace2: prevent segfault on config collection where no value specifiedAdam Murray via GitGitGadget, Nov 7, 2024
  2. Jeff KingNov 7, 2024
  3. Junio C HamanoNov 7, 2024
  4. trace2: prevent segfault on config collection where no value specifiedAdam Murray via GitGitGadget, Jan 10, 2025
  5. Junio C HamanoJan 10, 2025
  6. Johannes SchindelinJan 22, 2025
  7. Junio C HamanoJan 22, 2025
  8. Junio C HamanoJan 22, 2025
  9. D. Ben KnobleJan 23, 2025
  10. Junio C HamanoJan 23, 2025
  11. D. Ben KnobleJan 23, 2025

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.