From: Junio C Hamano <gitster@pobox.com>
To: Marius Storm-Olsen <marius@trolltech.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v4 1/4] Add log.mailmap as configurational option for mailmap location
Date: Thu, 05 Feb 2009 09:44:54 -0800 [thread overview]
Message-ID: <7vljskeq21.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 565c86bdbc8d6303d7d468fa196fb54ff7bd2352.1233819451.git.marius@trolltech.com
Marius Storm-Olsen <marius@trolltech.com> writes:
> diff --git a/config.c b/config.c
> index 790405a..9ebcbbe 100644
> --- a/config.c
> +++ b/config.c
> @@ -565,6 +565,13 @@ static int git_default_branch_config(const char *var, const char *value)
> return 0;
> }
>
> +static int git_default_log_config(const char *var, const char *value)
> +{
> + if (!strcmp(var, "log.mailmap"))
> + return git_config_string(&git_log_mailmap, var, value);
> + return 0;
> +}
> +
> int git_default_config(const char *var, const char *value, void *dummy)
> {
> if (!prefixcmp(var, "core."))
> @@ -579,6 +586,9 @@ int git_default_config(const char *var, const char *value, void *dummy)
> if (!prefixcmp(var, "branch."))
> return git_default_branch_config(var, value);
>
> + if (!prefixcmp(var, "log."))
> + return git_default_log_config(var, value);
> +
The placement of this looked *really* wrong, as mailmap is not *that*
important to most of the commands.
Initially I wondered if this should be better done inside existing
git_log_config(). I suspect that the reason you didn't do so is because
you would want to use this also in blame, which is not part of the log
family, and does not use git_log_config() (nor it should).
Which probably means that the code can stay here (it is just two strcmp
and assignment to a pointer variable), but also suggests that log.mailmap
is perhaps misnamed.
next prev parent reply other threads:[~2009-02-05 17:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 8:06 [PATCH v4 0/4] Extend mailmap functionality Marius Storm-Olsen
2009-02-05 8:06 ` [PATCH v4 1/4] Add log.mailmap as configurational option for mailmap location Marius Storm-Olsen
2009-02-05 8:06 ` [PATCH v4 2/4] Add find_insert_index, insert_at_index and clear_func functions to string_list Marius Storm-Olsen
2009-02-05 8:06 ` [PATCH v4 3/4] Add map_user() and clear_mailmap() to mailmap Marius Storm-Olsen
2009-02-05 8:06 ` [PATCH v4 4/4] Change current mailmap usage to do matching on both name and email of author/committer Marius Storm-Olsen
2009-02-05 17:44 ` Junio C Hamano [this message]
2009-02-05 19:33 ` [PATCH v4 1/4] Add log.mailmap as configurational option for mailmap location Marius Storm-Olsen
2009-02-05 20:22 ` Junio C Hamano
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=7vljskeq21.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=marius@trolltech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).