Re: [PATCH v6 00/15] Trace2 tracing facility

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

 



Hi Ævar,

On Thu, 21 Mar 2019, Ævar Arnfjörð Bjarmason wrote:

> On Thu, Mar 21 2019, Johannes Schindelin wrote:
>
> > On Sun, 17 Mar 2019, Ævar Arnfjörð Bjarmason wrote:
> >
> >>
> >> On Fri, Feb 15 2019, Jeff Hostetler wrote:
> >>
> >> > I could see having a "~/.git_tr2_config" or something similar in
> >> > some place like "/etc" that only contained the Trace2 settings. It
> >> > would be safe to read very early inside main() and we would not
> >> > consider it to be part of the real config.  For example, "git
> >> > config" would not know about it.  Then you could enforce a
> >> > system-wide setting without any of the env var issues.
> >>
> >> I haven't written a patch for this, but it seems to me that we could
> >> just start reading /etc/gitconfig via some custom config callback
> >> code early as e.g. 58b284a2e91 ("worktree: add per-worktree config
> >> files", 2018-10-21) does for the worktree config.
> >
> > Oy. Oy, oy, oy.
> >
> > Maybe use `read_early_config()` instead? That would be *a lot*
> > cleaner. You could maybe use a9bcf6586d1a (alias: use the early config
> > machinery to expand aliases, 2017-06-14) as an inspiration.
>
> Thanks. I was thinking *only* to do /etc/gitconfig and not the whole
> .git/config -> ~/.gitconfig etc. sequence just in terms of saving
> critical time (this is the performance trace path, after all...).
>
> But on a second reading I see that read_early_config() can do that if
> you set config_source->file, opts->respect_includes etc. I.e. it just
> (depending on options) resolves to git_config_from_file() which
> 58b284a2e91 used directly.

Sure, it can exclude the repo and user config, but would that not be
rather confusing?

Ciao,
Dscho

[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