Karsten Blees <karsten.bl...@gmail.com> writes:
> I still don't like that the invalidation is done in git_config_set, though, as
> this is also used to write completely unrelated files.
I don't get it. It is used to write the config files. Yes, we trigger a
complete reload instead of just changing this particular value in the
hashmap, but I do not see "unrelated files" in the picture.
> Wouldn't it be better to have a 'git_config_refresh()' that could be
> used in place of (or before) current 'git_config(callback)' calls? The
> initial implementation could just invalidate the config cache. If
> there's time and energy to spare, a more advanced version could first
> check if any of the involved config files has changed.
That would not change the "xstrdup" vs "no xstrdup" issue, right?
> The xstrdup() problem could be solved by interning strings (see the
> attached patch for a trivial implementation). I.e. allocate each distinct
> string only once (and keep it allocated).
That's an option. We need to be carefull not to modify any string
in-place, but I guess that would considerably simplify memory management
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html