Re: [PATCH v4 2/4] wrapper: reduce scope of remove_or_warn()
- From
- phillip.wood123@gmail.com <phillip.wood123@gmail.com>
- Date
- Oct 10, 2023, 09:59 UTC
- Message-ID
- <066b3162-6a81-45d7-b164-17b74e6c92dc@gmail.com>
- In-Reply-To
- <c9e7cd78576527571fd70b953e340b5bdd196221.1696021277.git.jonathantanmy@google.com>
Hi Jonathan
On 29/09/2023 22:20, Jonathan Tan wrote:
Show 10 quoted lines
> From: Calvin Wan <calvinwan@google.com>
>
> remove_or_warn() is only used by entry.c and apply.c, but it is
> currently declared and defined in wrapper.{h,c}, so it has a scope much
> greater than it needs. This needlessly large scope also causes wrapper.c
> to need to include object.h, when this file is largely unconcerned with
> Git objects.
>
> Move remove_or_warn() to entry.{h,c}. The file apply.c still has access
> to it, since it already includes entry.h for another reason.This looks good. On a related note wrapper.c includes repository.h but does use anything declared in that header.
Best Wishes
Phillip