Tanay Abhra <tanayabh@xxxxxxxxx> writes: > + if (!git_config_get_string("imap.user", &value)) > + server.user = xstrdup(value); > + if (!git_config_get_string("imap.pass", &value)) > + server.pass = xstrdup(value); > + if (!git_config_get_string("imap.port", &value)) > + server.port = git_config_int("port", value); > + if (!git_config_get_string("imap.tunnel", &value)) > + server.tunnel = xstrdup(value); > + if (!git_config_get_string("imap.authmethod", &value)) > + server.auth_method = xstrdup(value); Given this kind of systematic code, I find it very tempting to factor this with a new helper function as ... git_config_get_string_dup("imap.tunnel", &server.tunnel) git_config_get_string_dup("imap.authmethod", &server.auth_method) Is there any reason not to do so? -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html