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

Re: [PATCH 0/2] extra cleanups on top of ds/branch-checked-out

From
Derrick Stolee <derrickstolee@github.com>
Date
Jun 19, 2022, 18:12 UTC
Message-ID
<b23d209f-80bf-c741-dc47-68af48fa3220@github.com>
In-Reply-To
<Yq6deQf96g8M5wdg@coredump.intra.peff.net>
On 6/18/2022 11:52 PM, Jeff King wrote:
Show 12 quoted lines
> Here are a few extra cleanups on top of ds/branch-checked-out; that
> topic made some local "worktrees" variables obsolete, but didn't get rid
> of them.
> 
> The first was detected by my local -Wunused-parameter topic. The second
> is a similar case that the compiler doesn't happen to notice, but which
> I went digging for after seeing the first. I think that should be the
> extent of it. There's a third caller in validate_new_branchname(), but
> the series already got rid of its worktrees variable.
> 
>   [1/2]: fetch: stop passing around unused worktrees variable
>   [2/2]: branch: drop unused worktrees variable

Good catch. Thanks for identifying these. You are right that it would be nice if a compiler could identify these "create and free, no use" situations.

Thanks, -Stolee

Previous: Junio C Hamano
Message 7 of 7 in “extra cleanups on top of ds/branch-checked-out”
  1. 0/2 extra cleanups on top of ds/branch-checked-outJeff King, Jun 19, 2022
  2. 1/2 fetch: stop passing around unused worktrees variableJeff King, Jun 19, 2022
  3. 2/2 branch: drop unused worktrees variableJeff King, Jun 19, 2022
  4. Ævar Arnfjörð BjarmasonJun 20, 2022
  5. Jeff KingJul 1, 2022
  6. Junio C HamanoJun 21, 2022
  7. Derrick StoleeJun 19, 2022

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.