git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Eric Mills <ermills@epic.com>,
	 "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 3/3] refspec: store raw refspecs inside refspec_item
Date: Tue, 12 Nov 2024 18:30:05 +0900	[thread overview]
Message-ID: <xmqqttcc4x5u.fsf@gitster.g> (raw)
In-Reply-To: <20241112083937.GC3529122@coredump.intra.peff.net> (Jeff King's message of "Tue, 12 Nov 2024 03:39:37 -0500")

Jeff King <peff@peff.net> writes:

> The refspec struct keeps two matched arrays: one for the refspec_item
> structs and one for the original raw refspec strings. The main reason
> for this is that there are other users of refspec_item that do not care
> about the raw strings. But it does make managing the refspec struct
> awkward, as we must keep the two arrays in sync. This has led to bugs in
> the past (both leaks and double-frees).

Yeah, I was wondering about this while reading [2/3], and it is very
satisfying to see that the concluding step for the series ends in
this change.

Thanks.

      reply	other threads:[~2024-11-12  9:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11 22:15 [BUG REPORT] git fetch --prefetch with incorrect options hangs with 2.47.0 Eric Mills
2024-11-12  6:49 ` Jeff King
2024-11-12  8:32   ` [PATCH 0/3] double-free with git fetch --prefetch Jeff King
2024-11-12  8:34     ` [PATCH 1/3] fetch: adjust refspec->raw_nr when filtering prefetch refspecs Jeff King
2024-11-12  8:36     ` [PATCH 2/3] refspec: drop separate raw_nr count Jeff King
2024-11-12  8:39     ` [PATCH 3/3] refspec: store raw refspecs inside refspec_item Jeff King
2024-11-12  9:30       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqttcc4x5u.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ermills@epic.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).