Re: [PATCH 03/10] lazily load core.sharedrepository

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

 



On Tue, Mar 1, 2016 at 9:39 PM, Jeff King <peff@xxxxxxxx> wrote:
> +       if (need_shared_repository_from_config) {
> +               const char *var = "core.sharedrepository";
> +               const char *value;
> +               if (!git_config_get_value(var, &value))
> +                       the_shared_repository = git_config_perm(var, value);
> +               need_shared_repository_from_config = 0;
> +       }

If config cache is invalidated and reloaded by some crazy code (alias
code, most likely, but I didn't check), we could be in trouble. Is
there any clean way we could hook in git_config_clear() and reset
need_shared..  back  to 1 (or something of similar effect)? Or perhaps
maintain a "clear counter", increased at every clear, and we keep a
copy here, so we know if any more clear() has been called between
get_shared..() calls.

>         return the_shared_repository;
>  }

-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]