From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: Karsten Blees <karsten.blees@gmail•com>
Cc: Eric Sunshine <sunshine@sunshineco•com>,
Tanay Abhra <tanayabh@gmail•com>, Git List <git@vger•kernel.org>,
Ramkumar Ramachandra <artagnon@gmail•com>
Subject: Re: [RFC/PATCH] pager.c: replace git_config with git_config_get_string
Date: Sat, 28 Jun 2014 08:01:52 +0200 [thread overview]
Message-ID: <vpqy4whshbj.fsf@anie.imag.fr> (raw)
In-Reply-To: <53AE50A9.6010707@gmail.com> (Karsten Blees's message of "Sat, 28 Jun 2014 07:20:41 +0200")
Karsten Blees <karsten.blees@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
for strings.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2014-06-28 6:02 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 10:41 [RFC/PATCH V2] alias.c: replace git_config with git_config_get_string Tanay Abhra
2014-06-23 10:41 ` [RFC/PATCH V2] branch.c: " Tanay Abhra
2014-06-25 4:45 ` Eric Sunshine
2014-06-26 8:09 ` Tanay Abhra
2014-06-29 11:06 ` Eric Sunshine
2014-06-23 10:41 ` [RFC/PATCH] imap-send.c: " Tanay Abhra
2014-06-25 7:09 ` Eric Sunshine
2014-06-26 8:14 ` Tanay Abhra
2014-06-26 16:50 ` Matthieu Moy
2014-06-26 23:57 ` Karsten Blees
2014-06-23 10:41 ` [RFC/PATCH] notes-util.c: " Tanay Abhra
2014-06-25 7:54 ` Eric Sunshine
2014-06-26 8:19 ` Tanay Abhra
2014-06-29 11:01 ` Eric Sunshine
2014-06-30 13:34 ` Karsten Blees
2014-06-30 14:32 ` Eric Sunshine
2014-06-30 14:54 ` Karsten Blees
2014-06-30 14:39 ` Tanay Abhra
2014-06-30 15:56 ` Karsten Blees
2014-06-30 16:21 ` Tanay Abhra
2014-06-30 17:52 ` Junio C Hamano
2014-07-01 8:36 ` Matthieu Moy
2014-06-23 10:41 ` [RFC/PATCH] notes.c: " Tanay Abhra
2014-06-25 8:06 ` Eric Sunshine
2014-06-26 8:20 ` Tanay Abhra
2014-06-23 10:41 ` [RFC/PATCH] pager.c: " Tanay Abhra
2014-06-25 3:59 ` Eric Sunshine
2014-06-26 8:24 ` Tanay Abhra
2014-06-26 18:46 ` Karsten Blees
2014-06-27 11:55 ` Matthieu Moy
2014-06-27 16:57 ` Karsten Blees
2014-06-27 19:19 ` Matthieu Moy
2014-06-28 5:20 ` Karsten Blees
2014-06-28 6:01 ` Matthieu Moy [this message]
2014-06-28 14:29 ` Karsten Blees
2014-06-29 12:04 ` Matthieu Moy
2014-06-23 22:38 ` [RFC/PATCH V2] alias.c: " Jonathan Nieder
2014-06-24 1:50 ` Tanay Abhra
2014-06-25 2:12 ` Eric Sunshine
2014-06-26 8:24 ` Tanay Abhra
2014-06-26 16:39 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqy4whshbj.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp$(echo .)fr \
--cc=artagnon@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=karsten.blees@gmail$(echo .)com \
--cc=sunshine@sunshineco$(echo .)com \
--cc=tanayabh@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox