| 112 | "\n" |
| 113 | "Add a new entry to the mailmap, overriding existing entries."); |
| 114 | PyObject * |
| 115 | Mailmap_add_entry(Mailmap *self, PyObject *args, PyObject *kwargs) |
| 116 | { |
| 117 | char *keywords[] = {"real_name", "real_email", "replace_name", "replace_email", NULL}; |
| 118 | char *real_name = NULL, *real_email = NULL; |
| 119 | char *replace_name = NULL, *replace_email = NULL; |
| 120 | int error; |
| 121 | |
| 122 | if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zzzs", keywords, |
| 123 | &real_name, &real_email, |
| 124 | &replace_name, &replace_email)) |
| 125 | return NULL; |
| 126 | |
| 127 | /* replace_email cannot be null */ |
| 128 | if (!replace_email) { |
| 129 | PyErr_BadArgument(); |
| 130 | return NULL; |
| 131 | } |
| 132 | |
| 133 | error = git_mailmap_add_entry(self->mailmap, real_name, real_email, |
| 134 | replace_name, replace_email); |
| 135 | if (error < 0) |
| 136 | return Error_set(error); |
| 137 | |
| 138 | Py_RETURN_NONE; |
| 139 | } |
| 140 | |
| 141 | PyDoc_STRVAR(Mailmap_resolve__doc__, |
| 142 | "resolve(name: str, email: str) -> tuple[str, str]\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…