public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] memory leaks in remote.c
@ 2026-01-19  5:18 Jeff King
  2026-01-19  5:19 ` [PATCH 1/4] remote: return non-const pointer from error_buf() Jeff King
                   ` (5 more replies)
  0 siblings, 6 replies; 39+ messages in thread
From: Jeff King @ 2026-01-19  5:18 UTC (permalink / raw)
  To: git; +Cc: Harald Nordgren

This fixes some memory leaks in remote.c. Not urgent, as they are quite
old, but they are newly triggered in the test suite by Harald's
hn/status-compare-with-push topic. So I think we'd want to build that
topic on top of these.

The first two are just preparatory cleanups. Patch 3 fixes the leak that
Harald's series triggers (and adds its own test, of course). Patch 4 is
a hypothetical leak that I don't think can be triggered in practice (so
it's more of a cleanup).

  [1/4]: remote: return non-const pointer from error_buf()
  [2/4]: remote: drop const return of tracking_for_push_dest()
  [3/4]: remote: fix leak in branch_get_push_1() with invalid "simple" config
  [4/4]: remote: always allocate branch.push_tracking_ref

 remote.c                | 24 ++++++++++++++----------
 remote.h                |  2 +-
 t/for-each-ref-tests.sh |  9 +++++++++
 3 files changed, 24 insertions(+), 11 deletions(-)

-Peff

^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: [PATCH v25 2/2] status: show comparison with push remote tracking branch
@ 2026-01-13 17:03 Jeff King
  2026-01-13 18:35 ` Triangular workflow Harald Nordgren
  0 siblings, 1 reply; 39+ messages in thread
From: Jeff King @ 2026-01-13 17:03 UTC (permalink / raw)
  To: Harald Nordgren via GitGitGadget; +Cc: git, Harald Nordgren

On Tue, Jan 13, 2026 at 12:11:56PM +0000, Harald Nordgren via GitGitGadget wrote:

> Example output when tracking origin/main but push destination is
> origin/feature:
>     On branch feature
>     Your branch and 'origin/main' have diverged,
>     and have 3 and 1 different commits each, respectively.
>       (use "git pull" if you want to integrate the remote branch with yours)
> 
>     Your branch is ahead of 'origin/feature' by 1 commit.
>       (use "git push" to publish your local commits)

Can we make this configurable?

I build my daily driver off of the 'jch' branch, which now includes this
series, and I've found that for my triangular workflow the ahead/behind
for the push branch is just useless noise. I treat my push destination
like a mirror, where I always just push up everything at the end of the
day.

I know that the output can be disabled with status.aheadbehind, but:

  1. I noticed this first via "git checkout", which does not have such a
     flag (AFAIK).

  2. That flag would also disable the upstream branch ahead/behind
     output, which I do find useful.

-Peff

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2026-01-20 20:18 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19  5:18 [PATCH 0/4] memory leaks in remote.c Jeff King
2026-01-19  5:19 ` [PATCH 1/4] remote: return non-const pointer from error_buf() Jeff King
2026-01-19  6:33   ` Patrick Steinhardt
2026-01-20  0:28     ` Junio C Hamano
2026-01-20 19:38       ` Jeff King
2026-01-20 20:18         ` Junio C Hamano
2026-01-19  5:20 ` [PATCH 2/4] remote: drop const return of tracking_for_push_dest() Jeff King
2026-01-19  6:34   ` Patrick Steinhardt
2026-01-19  5:22 ` [PATCH 3/4] remote: fix leak in branch_get_push_1() with invalid "simple" config Jeff King
2026-01-19  6:34   ` Patrick Steinhardt
2026-01-19  5:23 ` [PATCH 4/4] remote: always allocate branch.push_tracking_ref Jeff King
2026-01-19  6:34   ` Patrick Steinhardt
2026-01-19 15:04 ` Triangular workflow Harald Nordgren
2026-01-20 19:40   ` Jeff King
2026-01-20  0:31 ` [PATCH 0/4] memory leaks in remote.c Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2026-01-13 17:03 [PATCH v25 2/2] status: show comparison with push remote tracking branch Jeff King
2026-01-13 18:35 ` Triangular workflow Harald Nordgren
2026-01-13 21:40   ` Jeff King
2026-01-13 23:01     ` Harald Nordgren
2026-01-14  2:22       ` D. Ben Knoble
2026-01-14  7:59         ` Harald Nordgren
2026-01-14 21:38           ` Ben Knoble
2026-01-14  2:34       ` Jeff King
2026-01-14  7:53         ` Harald Nordgren
2026-01-14 16:24           ` Jeff King
2026-01-14 17:48             ` Harald Nordgren
2026-01-14 21:01               ` Jeff King
2026-01-14 21:38             ` Ben Knoble
2026-01-14 22:17               ` Jeff King
2026-01-15 16:17                 ` D. Ben Knoble
2026-01-14 14:15         ` Junio C Hamano
2026-01-14 18:54     ` Junio C Hamano
2026-01-14 21:10       ` Jeff King
2026-01-14 21:38         ` Ben Knoble
2026-01-14 23:08           ` Harald Nordgren
2026-01-19  5:58           ` Chris Torek
2026-01-20  8:35             ` Harald Nordgren
2026-01-14 23:12       ` Harald Nordgren
2026-01-14 23:31         ` Junio C Hamano
2026-01-18 19:58       ` Harald Nordgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox