* [PATCH] config: respect '~' and '~user' in mailmap.file
@ 2014-05-27 8:45 Øystein Walle
2014-05-27 16:09 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Øystein Walle @ 2014-05-27 8:45 UTC (permalink / raw)
To: git; +Cc: Øystein Walle
git_config_string() does not handle '~' and '~user' as part of the
value. Using git_config_pathname() fixes this.
Signed-off-by: Øystein Walle <oystwa@gmail.com>
---
config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.c b/config.c
index 314d8ee..ec7af5f 100644
--- a/config.c
+++ b/config.c
@@ -963,7 +963,7 @@ static int git_default_push_config(const char *var, const char *value)
static int git_default_mailmap_config(const char *var, const char *value)
{
if (!strcmp(var, "mailmap.file"))
- return git_config_string(&git_mailmap_file, var, value);
+ return git_config_pathname(&git_mailmap_file, var, value);
if (!strcmp(var, "mailmap.blob"))
return git_config_string(&git_mailmap_blob, var, value);
--
2.0.0.rc4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] config: respect '~' and '~user' in mailmap.file
2014-05-27 8:45 [PATCH] config: respect '~' and '~user' in mailmap.file Øystein Walle
@ 2014-05-27 16:09 ` Jeff King
2014-05-27 23:28 ` Øystein Walle
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2014-05-27 16:09 UTC (permalink / raw)
To: Øystein Walle; +Cc: git
On Tue, May 27, 2014 at 10:45:58AM +0200, Øystein Walle wrote:
> git_config_string() does not handle '~' and '~user' as part of the
> value. Using git_config_pathname() fixes this.
Makes sense. Curious if there was a reason we did not use it in the
first place, I looked at the history. The reason is that mailmap.file
was added in d551a48 (2009-02-08) and git_config_pathname came months
later in 395de25 (2009-11-17). Retro-fitting it now should not cause a
problem for any sane paths. So:
Reviewed-by: Jeff King <peff@peff.net>
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] config: respect '~' and '~user' in mailmap.file
2014-05-27 16:09 ` Jeff King
@ 2014-05-27 23:28 ` Øystein Walle
0 siblings, 0 replies; 3+ messages in thread
From: Øystein Walle @ 2014-05-27 23:28 UTC (permalink / raw)
To: git
Jeff King <peff <at> peff.net> writes:
>
> Makes sense. Curious if there was a reason we did not use it in the
> first place, I looked at the history. The reason is that mailmap.file
> was added in d551a48 (2009-02-08) and git_config_pathname came months
> later in 395de25 (2009-11-17). Retro-fitting it now should not cause a
> problem for any sane paths. So:
>
> Reviewed-by: Jeff King <peff <at> peff.net>
>
> -Peff
>
Thanks for the review.
I saw it was added back in 2009 but didn't give it much thought other
than "Oh, that bug has been there for a long time!" :) (Not that this is
a serious bug as such, more than a slight inconsistency in how the path
is handled compared to other config values expected to be paths)
Øsse
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-27 23:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27 8:45 [PATCH] config: respect '~' and '~user' in mailmap.file Øystein Walle
2014-05-27 16:09 ` Jeff King
2014-05-27 23:28 ` Øystein Walle
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).