| 1984 | "If no ref is given 'refs/notes/commits' will be used."); |
| 1985 | |
| 1986 | PyObject * |
| 1987 | Repository_create_note(Repository *self, PyObject* args) |
| 1988 | { |
| 1989 | git_oid note_id, annotated_id; |
| 1990 | char *annotated = NULL, *message = NULL, *ref = "refs/notes/commits"; |
| 1991 | int err = GIT_ERROR; |
| 1992 | unsigned int force = 0; |
| 1993 | Signature *py_author, *py_committer; |
| 1994 | |
| 1995 | if (!PyArg_ParseTuple(args, "sO!O!s|si", |
| 1996 | &message, |
| 1997 | &SignatureType, &py_author, |
| 1998 | &SignatureType, &py_committer, |
| 1999 | &annotated, &ref, &force)) |
| 2000 | return NULL; |
| 2001 | |
| 2002 | err = git_oid_fromstr(&annotated_id, annotated); |
| 2003 | if (err < 0) |
| 2004 | return Error_set(err); |
| 2005 | |
| 2006 | err = git_note_create(¬e_id, self->repo, ref, py_author->signature, |
| 2007 | py_committer->signature, |
| 2008 | &annotated_id, message, force); |
| 2009 | if (err < 0) |
| 2010 | return Error_set(err); |
| 2011 | |
| 2012 | return git_oid_to_python(¬e_id); |
| 2013 | } |
| 2014 | |
| 2015 | |
| 2016 | PyDoc_STRVAR(Repository_lookup_note__doc__, |
nothing calls this directly
no test coverage detected
searching dependent graphs…