Re: [PATCH 0/4] config.h

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

 



On 06/12, Jeff King wrote:
> On Mon, Jun 12, 2017 at 02:53:52PM -0700, Brandon Williams wrote:
> 
> > > These all seem reasonable to me. Patch 3 made me shrug a little, because
> > > it seems like the majority of C files end up including it anyway. I
> > > suspect you could break config.h down into two files: the few things
> > > that everybody needs (git_config() and the few parsing functions needed
> > > in callbacks) and the ones for commands that actually manipulate the
> > > config.
> > > 
> > > That would reduce the surface area of the module that most callers look
> > > at, but I don't think there's a huge benefit to doing so (mostly it just
> > > makes re-compiling faster by decreasing the chance that a dependent
> > > header has changed for each file).
> > 
> > Yes, ultimately I think it would be a good thing to break config.c down
> > into at least 2 more files (the file parsing logic and the config_set
> > logic) but that can be done at a later point.  I started looking at
> > doing that now but that logic is a little more entangled than I thought
> > it was.
> 
> To be clear, I don't mind that sort of module refactoring and like the
> results.  But it almost certainly isn't the biggest bang-for-buck in
> terms of the time it takes versus the benefit it brings. So take my
> comment as "we could also do..." but not "we should not take your patch
> because it does not go far enough".

Yes, that's how I understood your comment.  I realize that there's a lot
of improvements that can be done across our code base and one rabbit
hole that is easy to fall into is "fix all the things right now!" hence
why I decided to defer doing that to a later date.  And I agree that
doing that extra work doesn't buy us 'all too much'.

Having said that I do think it was worthwhile to remove the config
declarations from cache.h.  I think in the long term it would be nice to
limit cache.h's scope as it is very unapproachable in its current form.

-- 
Brandon Williams



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