All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Shashank S via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	Kaartic Sivaraam <kaartic.sivaraam@gmail.com>,
	Christian Couder <christian.couder@gmail.com>,
	Siddharth Asthana <siddharthasthana31@gmail.com>,
	Usman Akinyemi <usmanakinyemi202@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Shashank S <shashu8660@gmail.com>
Subject: Re: [PATCH v2] [Outreachy Patch] prune-packed: remove USE_THE_REPOSITORY_VARIABLE
Date: Fri, 23 Oct 2026 09:02:21 +0200	[thread overview]
Message-ID: <atsGfWzCMW0LMHNX@pks.im> (raw)
In-Reply-To: <pull.2266.v2.git.1792428811100.gitgitgadget@gmail.com>

On Mon, Oct 19, 2026 at 04:53:31PM +0000, Shashank S via GitGitGadget wrote:
> Range-diff vs v1:
> 
>  1:  5d9ba0cf3a ! 1:  6b583e1d46 prune-packed: remove USE_THE_REPOSITORY_VARIABLE
>      @@
>        ## Metadata ##
>      -Author: Shashank <shashu8660@gmail.com>
>      +Author: Shashank S Mogaveera <shashu8660@gmail.com>
>       
>        ## Commit message ##
>      -    prune-packed: remove USE_THE_REPOSITORY_VARIABLE
>      +    [Outreachy Patch] prune-packed: remove USE_THE_REPOSITORY_VARIABLE

This prefix shouldn't be part of the patch subject itself.

>      -    Right now, the prune_packed_objects() function uses the global
>      +    The prune_packed_objects() function uses the global
>           the_repository variable. To help with the libification effort,
>           change this function so it takes a 'struct repository' pointer
>           as an argument instead.
>      @@ Commit message
>           prune_object() callbacks to read from this new struct.
>       
>           Update the builtins that call this function (builtin/prune-packed.c,
>      -    builtin/prune.c, and builtin/repack.c) to pass their local `repo`

One small nit: I don't think we need to have the list here.

>      -    variables. Because we are now actually using the 'repo'  parameter
>      -    in these files, we can safely remove the UNUSED macro from them.
>      +    builtin/prune.c, and builtin/repack.c) to pass their local 'repo'
>      +    variables. We can safely remove the UNUSED macro from them because
>      +    these commands are all declared with the RUN_SETUP flag in git.c,
>      +    which guarantees that the 'repo' pointer will never be NULL.

As mentioned by Junio, this isn't true. The repo pointer _may_ be NULL
in the case where "-h" is passed.

Thanks!

Patrick

  reply	other threads:[~2026-10-23  7:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 16:31 [PATCH] prune-packed: remove USE_THE_REPOSITORY_VARIABLE Shashank S via GitGitGadget
2026-10-19  7:09 ` Patrick Steinhardt
2026-10-19 16:38   ` Shashank S
2026-10-19 21:05     ` Junio C Hamano
2026-10-20 16:27       ` Shashank S
2026-10-19 16:53 ` [PATCH v2] [Outreachy Patch] " Shashank S via GitGitGadget
2026-10-23  7:02   ` Patrick Steinhardt [this message]
2026-10-24  4:16     ` Shashank S
2026-10-24  9:22 ` [PATCH v3] " Shashank S via GitGitGadget
2026-10-26  8:38   ` Patrick Steinhardt
2026-10-27 17:11     ` Shashank S
2026-10-27 16:59 ` [PATCH v4] " Shashank S via GitGitGadget
2026-10-28  7:19   ` Patrick Steinhardt
2026-10-28 16:13     ` Junio C Hamano

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=atsGfWzCMW0LMHNX@pks.im \
    --to=ps@pks.im \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=kaartic.sivaraam@gmail.com \
    --cc=shashu8660@gmail.com \
    --cc=siddharthasthana31@gmail.com \
    --cc=usmanakinyemi202@gmail.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.