{"thread":{"id":"36758","subject":"[PATCH] config: respect '~' and '~user' in mailmap.file","startedAt":"2014-05-27T08:45:58Z","lastAt":"2014-05-27T23:28:56Z","messageCount":3,"participants":["Øystein Walle","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"242735","messageId":"1401180358-27281-1-git-send-email-oystwa@gmail.com","threadId":"36758","inReplyTo":null,"subject":"[PATCH] config: respect '~' and '~user' in mailmap.file","fromName":"Øystein Walle","fromEmail":"oystwa@gmail.com","sentAt":"2014-05-27T08:45:58Z","receivedAt":"2014-05-27T08:45:58Z","isPatch":true,"sender":{"key":"oystwa@gmail.com","avatar":"https://avatars.githubusercontent.com/u/794585?v=4"},"body":"git_config_string() does not handle '~' and '~user' as part of the\nvalue. Using git_config_pathname() fixes this.\n\nSigned-off-by: Øystein Walle <oystwa@gmail.com>\n---\n config.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.c b/config.c\nindex 314d8ee..ec7af5f 100644\n--- a/config.c\n+++ b/config.c\n@@ -963,7 +963,7 @@ static int git_default_push_config(const char *var, const char *value)\n static int git_default_mailmap_config(const char *var, const char *value)\n {\n \tif (!strcmp(var, \"mailmap.file\"))\n-\t\treturn git_config_string(&git_mailmap_file, var, value);\n+\t\treturn git_config_pathname(&git_mailmap_file, var, value);\n \tif (!strcmp(var, \"mailmap.blob\"))\n \t\treturn git_config_string(&git_mailmap_blob, var, value);\n \n-- \n2.0.0.rc4\n"},{"id":"242749","messageId":"20140527160939.GA29693@sigill.intra.peff.net","threadId":"36758","inReplyTo":"1401180358-27281-1-git-send-email-oystwa@gmail.com","subject":"Re: [PATCH] config: respect '~' and '~user' in mailmap.file","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-05-27T16:09:39Z","receivedAt":"2014-05-27T16:09:39Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, May 27, 2014 at 10:45:58AM +0200, Øystein Walle wrote:\n\n> git_config_string() does not handle '~' and '~user' as part of the\n> value. Using git_config_pathname() fixes this.\n\nMakes sense. Curious if there was a reason we did not use it in the\nfirst place, I looked at the history. The reason is that mailmap.file\nwas added in d551a48 (2009-02-08) and git_config_pathname came months\nlater in 395de25 (2009-11-17). Retro-fitting it now should not cause a\nproblem for any sane paths. So:\n\nReviewed-by: Jeff King <peff@peff.net>\n\n-Peff\n"},{"id":"242826","messageId":"loom.20140528T012425-812@post.gmane.org","threadId":"36758","inReplyTo":"20140527160939.GA29693@sigill.intra.peff.net","subject":"Re: [PATCH] config: respect '~' and '~user' in mailmap.file","fromName":"Øystein Walle","fromEmail":"oystwa@gmail.com","sentAt":"2014-05-27T23:28:56Z","receivedAt":"2014-05-27T23:28:56Z","isPatch":true,"sender":{"key":"oystwa@gmail.com","avatar":"https://avatars.githubusercontent.com/u/794585?v=4"},"body":"Jeff King <peff <at> peff.net> writes:\n\n> \n> Makes sense. Curious if there was a reason we did not use it in the\n> first place, I looked at the history. The reason is that mailmap.file\n> was added in d551a48 (2009-02-08) and git_config_pathname came months\n> later in 395de25 (2009-11-17). Retro-fitting it now should not cause a\n> problem for any sane paths. So:\n> \n> Reviewed-by: Jeff King <peff <at> peff.net>\n> \n> -Peff\n>\n \nThanks for the review. \n\nI saw it was added back in 2009 but didn't give it much thought other\nthan \"Oh, that bug has been there for a long time!\" :) (Not that this is\na serious bug as such, more than a slight inconsistency in how the path\nis handled compared to other config values expected to be paths)\n\nØsse\n"}]}