All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, me@ttaylorr.com,
	Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH 2/2] fsck: use local repository
Date: Mon, 01 May 2023 12:10:28 -0700	[thread overview]
Message-ID: <xmqqr0rz50m3.fsf@gitster.g> (raw)
In-Reply-To: <2162a352a46dc0c40afccc4defc88a1e8940ce6c.1682965296.git.gitgitgadget@gmail.com> (Derrick Stolee via GitGitGadget's message of "Mon, 01 May 2023 18:21:35 +0000")

"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Derrick Stolee <derrickstolee@github.com>
>
> In 0d30feef3c5 (fsck: create scaffolding for rev-index checks,
> 2023-04-17) and later 5a6072f631d (fsck: validate .rev file header,
> 2023-04-17), the check_pack_rev_indexes() method was created with a
> 'struct repository *r' parameter. However, this parameter was unused and
> instead 'the_repository' was used in its place.
>
> Fix this situation with the obvious replacement.

Indeed obvious it is.  Thanks, will queue.

>
> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
> ---
>  builtin/fsck.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/builtin/fsck.c b/builtin/fsck.c
> index 75b30d1d00c..dcc165bf0c5 100644
> --- a/builtin/fsck.c
> +++ b/builtin/fsck.c
> @@ -869,20 +869,20 @@ static int check_pack_rev_indexes(struct repository *r, int show_progress)
>  	int res = 0;
>  
>  	if (show_progress) {
> -		for (struct packed_git *p = get_all_packs(the_repository); p; p = p->next)
> +		for (struct packed_git *p = get_all_packs(r); p; p = p->next)
>  			pack_count++;
>  		progress = start_delayed_progress("Verifying reverse pack-indexes", pack_count);
>  		pack_count = 0;
>  	}
>  
> -	for (struct packed_git *p = get_all_packs(the_repository); p; p = p->next) {
> +	for (struct packed_git *p = get_all_packs(r); p; p = p->next) {
>  		int load_error = load_pack_revindex_from_disk(p);
>  
>  		if (load_error < 0) {
>  			error(_("unable to load rev-index for pack '%s'"), p->pack_name);
>  			res = ERROR_PACK_REV_INDEX;
>  		} else if (!load_error &&
> -			   !load_pack_revindex(the_repository, p) &&
> +			   !load_pack_revindex(r, p) &&
>  			   verify_pack_revindex(p)) {
>  			error(_("invalid rev-index for pack '%s'"), p->pack_name);
>  			res = ERROR_PACK_REV_INDEX;

  reply	other threads:[~2023-05-01 19:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 18:21 [PATCH 0/2] fsck: verify .bitmap checksums, cleanup Derrick Stolee via GitGitGadget
2023-05-01 18:21 ` [PATCH 1/2] fsck: verify checksums of all .bitmap files Derrick Stolee via GitGitGadget
2023-05-01 19:07   ` Junio C Hamano
2023-05-01 18:21 ` [PATCH 2/2] fsck: use local repository Derrick Stolee via GitGitGadget
2023-05-01 19:10   ` Junio C Hamano [this message]
2023-05-02 13:27 ` [PATCH v2 0/2] fsck: verify .bitmap checksums, cleanup Derrick Stolee via GitGitGadget
2023-05-02 13:27   ` [PATCH v2 1/2] fsck: verify checksums of all .bitmap files Derrick Stolee via GitGitGadget
2023-05-02 13:27   ` [PATCH v2 2/2] fsck: use local repository Derrick Stolee via GitGitGadget

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=xmqqr0rz50m3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=me@ttaylorr.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.