Re: [PATCH v2 1/3] difftool: eliminate use of global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 6, 2025 at 5:34 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> David Aguilar <davvid@xxxxxxxxx> writes:
>
> > Move difftool's global variables into a difftools_option struct
> > in preparation for removal of USE_THE_REPOSITORY_VARIABLE.
>
> Both may be good things, but I am puzzled by the "in preparation
> for" part of the above description.  Would it require we lose these
> three global variables if we wanted to pass through a repository
> instance through the callchain instead of relying on implicit use of
> the_repository?
>
> Aren't these pretty much independent and orthogonal?

The declaration of 'extern int has_symlinks;' in environment.h is
guarded by an #ifdef USE_THE_REPOSITORY_VARIABLE, so if you want to
stop declaring that, you need to both pass a repository through and
stop using that global variable.  (The change to trust_exit_code and
symlinks vars do seem to be independent, but kind of make sense to
handle at the same time you are changing how has_symlinks is treated.)





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux