Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/imh-pyth.../include/git2
File: notes.h
/*
[0] Fix | Delete
* Copyright (C) the libgit2 contributors. All rights reserved.
[1] Fix | Delete
*
[2] Fix | Delete
* This file is part of libgit2, distributed under the GNU GPL v2 with
[3] Fix | Delete
* a Linking Exception. For full terms see the included COPYING file.
[4] Fix | Delete
*/
[5] Fix | Delete
#ifndef INCLUDE_git_note_h__
[6] Fix | Delete
#define INCLUDE_git_note_h__
[7] Fix | Delete
[8] Fix | Delete
#include "oid.h"
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* @file git2/notes.h
[12] Fix | Delete
* @brief Git notes management routines
[13] Fix | Delete
* @defgroup git_note Git notes management routines
[14] Fix | Delete
* @ingroup Git
[15] Fix | Delete
* @{
[16] Fix | Delete
*/
[17] Fix | Delete
GIT_BEGIN_DECL
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Callback for git_note_foreach.
[21] Fix | Delete
*
[22] Fix | Delete
* Receives:
[23] Fix | Delete
* - blob_id: Oid of the blob containing the message
[24] Fix | Delete
* - annotated_object_id: Oid of the git object being annotated
[25] Fix | Delete
* - payload: Payload data passed to `git_note_foreach`
[26] Fix | Delete
*/
[27] Fix | Delete
typedef int GIT_CALLBACK(git_note_foreach_cb)(
[28] Fix | Delete
const git_oid *blob_id, const git_oid *annotated_object_id, void *payload);
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* note iterator
[32] Fix | Delete
*/
[33] Fix | Delete
typedef struct git_iterator git_note_iterator;
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* Creates a new iterator for notes
[37] Fix | Delete
*
[38] Fix | Delete
* The iterator must be freed manually by the user.
[39] Fix | Delete
*
[40] Fix | Delete
* @param out pointer to the iterator
[41] Fix | Delete
* @param repo repository where to look up the note
[42] Fix | Delete
* @param notes_ref canonical name of the reference to use (optional); defaults to
[43] Fix | Delete
* "refs/notes/commits"
[44] Fix | Delete
*
[45] Fix | Delete
* @return 0 or an error code
[46] Fix | Delete
*/
[47] Fix | Delete
GIT_EXTERN(int) git_note_iterator_new(
[48] Fix | Delete
git_note_iterator **out,
[49] Fix | Delete
git_repository *repo,
[50] Fix | Delete
const char *notes_ref);
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Creates a new iterator for notes from a commit
[54] Fix | Delete
*
[55] Fix | Delete
* The iterator must be freed manually by the user.
[56] Fix | Delete
*
[57] Fix | Delete
* @param out pointer to the iterator
[58] Fix | Delete
* @param notes_commit a pointer to the notes commit object
[59] Fix | Delete
*
[60] Fix | Delete
* @return 0 or an error code
[61] Fix | Delete
*/
[62] Fix | Delete
GIT_EXTERN(int) git_note_commit_iterator_new(
[63] Fix | Delete
git_note_iterator **out,
[64] Fix | Delete
git_commit *notes_commit);
[65] Fix | Delete
[66] Fix | Delete
/**
[67] Fix | Delete
* Frees an git_note_iterator
[68] Fix | Delete
*
[69] Fix | Delete
* @param it pointer to the iterator
[70] Fix | Delete
*/
[71] Fix | Delete
GIT_EXTERN(void) git_note_iterator_free(git_note_iterator *it);
[72] Fix | Delete
[73] Fix | Delete
/**
[74] Fix | Delete
* Return the current item (note_id and annotated_id) and advance the iterator
[75] Fix | Delete
* internally to the next value
[76] Fix | Delete
*
[77] Fix | Delete
* @param note_id id of blob containing the message
[78] Fix | Delete
* @param annotated_id id of the git object being annotated
[79] Fix | Delete
* @param it pointer to the iterator
[80] Fix | Delete
*
[81] Fix | Delete
* @return 0 (no error), GIT_ITEROVER (iteration is done) or an error code
[82] Fix | Delete
* (negative value)
[83] Fix | Delete
*/
[84] Fix | Delete
GIT_EXTERN(int) git_note_next(
[85] Fix | Delete
git_oid* note_id,
[86] Fix | Delete
git_oid* annotated_id,
[87] Fix | Delete
git_note_iterator *it);
[88] Fix | Delete
[89] Fix | Delete
[90] Fix | Delete
/**
[91] Fix | Delete
* Read the note for an object
[92] Fix | Delete
*
[93] Fix | Delete
* The note must be freed manually by the user.
[94] Fix | Delete
*
[95] Fix | Delete
* @param out pointer to the read note; NULL in case of error
[96] Fix | Delete
* @param repo repository where to look up the note
[97] Fix | Delete
* @param notes_ref canonical name of the reference to use (optional); defaults to
[98] Fix | Delete
* "refs/notes/commits"
[99] Fix | Delete
* @param oid OID of the git object to read the note from
[100] Fix | Delete
*
[101] Fix | Delete
* @return 0 or an error code
[102] Fix | Delete
*/
[103] Fix | Delete
GIT_EXTERN(int) git_note_read(
[104] Fix | Delete
git_note **out,
[105] Fix | Delete
git_repository *repo,
[106] Fix | Delete
const char *notes_ref,
[107] Fix | Delete
const git_oid *oid);
[108] Fix | Delete
[109] Fix | Delete
[110] Fix | Delete
/**
[111] Fix | Delete
* Read the note for an object from a note commit
[112] Fix | Delete
*
[113] Fix | Delete
* The note must be freed manually by the user.
[114] Fix | Delete
*
[115] Fix | Delete
* @param out pointer to the read note; NULL in case of error
[116] Fix | Delete
* @param repo repository where to look up the note
[117] Fix | Delete
* @param notes_commit a pointer to the notes commit object
[118] Fix | Delete
* @param oid OID of the git object to read the note from
[119] Fix | Delete
*
[120] Fix | Delete
* @return 0 or an error code
[121] Fix | Delete
*/
[122] Fix | Delete
GIT_EXTERN(int) git_note_commit_read(
[123] Fix | Delete
git_note **out,
[124] Fix | Delete
git_repository *repo,
[125] Fix | Delete
git_commit *notes_commit,
[126] Fix | Delete
const git_oid *oid);
[127] Fix | Delete
[128] Fix | Delete
/**
[129] Fix | Delete
* Get the note author
[130] Fix | Delete
*
[131] Fix | Delete
* @param note the note
[132] Fix | Delete
* @return the author
[133] Fix | Delete
*/
[134] Fix | Delete
GIT_EXTERN(const git_signature *) git_note_author(const git_note *note);
[135] Fix | Delete
[136] Fix | Delete
/**
[137] Fix | Delete
* Get the note committer
[138] Fix | Delete
*
[139] Fix | Delete
* @param note the note
[140] Fix | Delete
* @return the committer
[141] Fix | Delete
*/
[142] Fix | Delete
GIT_EXTERN(const git_signature *) git_note_committer(const git_note *note);
[143] Fix | Delete
[144] Fix | Delete
[145] Fix | Delete
/**
[146] Fix | Delete
* Get the note message
[147] Fix | Delete
*
[148] Fix | Delete
* @param note the note
[149] Fix | Delete
* @return the note message
[150] Fix | Delete
*/
[151] Fix | Delete
GIT_EXTERN(const char *) git_note_message(const git_note *note);
[152] Fix | Delete
[153] Fix | Delete
[154] Fix | Delete
/**
[155] Fix | Delete
* Get the note object's id
[156] Fix | Delete
*
[157] Fix | Delete
* @param note the note
[158] Fix | Delete
* @return the note object's id
[159] Fix | Delete
*/
[160] Fix | Delete
GIT_EXTERN(const git_oid *) git_note_id(const git_note *note);
[161] Fix | Delete
[162] Fix | Delete
/**
[163] Fix | Delete
* Add a note for an object
[164] Fix | Delete
*
[165] Fix | Delete
* @param out pointer to store the OID (optional); NULL in case of error
[166] Fix | Delete
* @param repo repository where to store the note
[167] Fix | Delete
* @param notes_ref canonical name of the reference to use (optional);
[168] Fix | Delete
* defaults to "refs/notes/commits"
[169] Fix | Delete
* @param author signature of the notes commit author
[170] Fix | Delete
* @param committer signature of the notes commit committer
[171] Fix | Delete
* @param oid OID of the git object to decorate
[172] Fix | Delete
* @param note Content of the note to add for object oid
[173] Fix | Delete
* @param force Overwrite existing note
[174] Fix | Delete
*
[175] Fix | Delete
* @return 0 or an error code
[176] Fix | Delete
*/
[177] Fix | Delete
GIT_EXTERN(int) git_note_create(
[178] Fix | Delete
git_oid *out,
[179] Fix | Delete
git_repository *repo,
[180] Fix | Delete
const char *notes_ref,
[181] Fix | Delete
const git_signature *author,
[182] Fix | Delete
const git_signature *committer,
[183] Fix | Delete
const git_oid *oid,
[184] Fix | Delete
const char *note,
[185] Fix | Delete
int force);
[186] Fix | Delete
[187] Fix | Delete
/**
[188] Fix | Delete
* Add a note for an object from a commit
[189] Fix | Delete
*
[190] Fix | Delete
* This function will create a notes commit for a given object,
[191] Fix | Delete
* the commit is a dangling commit, no reference is created.
[192] Fix | Delete
*
[193] Fix | Delete
* @param notes_commit_out pointer to store the commit (optional);
[194] Fix | Delete
* NULL in case of error
[195] Fix | Delete
* @param notes_blob_out a point to the id of a note blob (optional)
[196] Fix | Delete
* @param repo repository where the note will live
[197] Fix | Delete
* @param parent Pointer to parent note
[198] Fix | Delete
* or NULL if this shall start a new notes tree
[199] Fix | Delete
* @param author signature of the notes commit author
[200] Fix | Delete
* @param committer signature of the notes commit committer
[201] Fix | Delete
* @param oid OID of the git object to decorate
[202] Fix | Delete
* @param note Content of the note to add for object oid
[203] Fix | Delete
* @param allow_note_overwrite Overwrite existing note
[204] Fix | Delete
*
[205] Fix | Delete
* @return 0 or an error code
[206] Fix | Delete
*/
[207] Fix | Delete
GIT_EXTERN(int) git_note_commit_create(
[208] Fix | Delete
git_oid *notes_commit_out,
[209] Fix | Delete
git_oid *notes_blob_out,
[210] Fix | Delete
git_repository *repo,
[211] Fix | Delete
git_commit *parent,
[212] Fix | Delete
const git_signature *author,
[213] Fix | Delete
const git_signature *committer,
[214] Fix | Delete
const git_oid *oid,
[215] Fix | Delete
const char *note,
[216] Fix | Delete
int allow_note_overwrite);
[217] Fix | Delete
[218] Fix | Delete
/**
[219] Fix | Delete
* Remove the note for an object
[220] Fix | Delete
*
[221] Fix | Delete
* @param repo repository where the note lives
[222] Fix | Delete
* @param notes_ref canonical name of the reference to use (optional);
[223] Fix | Delete
* defaults to "refs/notes/commits"
[224] Fix | Delete
* @param author signature of the notes commit author
[225] Fix | Delete
* @param committer signature of the notes commit committer
[226] Fix | Delete
* @param oid OID of the git object to remove the note from
[227] Fix | Delete
*
[228] Fix | Delete
* @return 0 or an error code
[229] Fix | Delete
*/
[230] Fix | Delete
GIT_EXTERN(int) git_note_remove(
[231] Fix | Delete
git_repository *repo,
[232] Fix | Delete
const char *notes_ref,
[233] Fix | Delete
const git_signature *author,
[234] Fix | Delete
const git_signature *committer,
[235] Fix | Delete
const git_oid *oid);
[236] Fix | Delete
[237] Fix | Delete
/**
[238] Fix | Delete
* Remove the note for an object
[239] Fix | Delete
*
[240] Fix | Delete
* @param notes_commit_out pointer to store the new notes commit (optional);
[241] Fix | Delete
* NULL in case of error.
[242] Fix | Delete
* When removing a note a new tree containing all notes
[243] Fix | Delete
* sans the note to be removed is created and a new commit
[244] Fix | Delete
* pointing to that tree is also created.
[245] Fix | Delete
* In the case where the resulting tree is an empty tree
[246] Fix | Delete
* a new commit pointing to this empty tree will be returned.
[247] Fix | Delete
* @param repo repository where the note lives
[248] Fix | Delete
* @param notes_commit a pointer to the notes commit object
[249] Fix | Delete
* @param author signature of the notes commit author
[250] Fix | Delete
* @param committer signature of the notes commit committer
[251] Fix | Delete
* @param oid OID of the git object to remove the note from
[252] Fix | Delete
*
[253] Fix | Delete
* @return 0 or an error code
[254] Fix | Delete
*/
[255] Fix | Delete
GIT_EXTERN(int) git_note_commit_remove(
[256] Fix | Delete
git_oid *notes_commit_out,
[257] Fix | Delete
git_repository *repo,
[258] Fix | Delete
git_commit *notes_commit,
[259] Fix | Delete
const git_signature *author,
[260] Fix | Delete
const git_signature *committer,
[261] Fix | Delete
const git_oid *oid);
[262] Fix | Delete
[263] Fix | Delete
/**
[264] Fix | Delete
* Free a git_note object
[265] Fix | Delete
*
[266] Fix | Delete
* @param note git_note object
[267] Fix | Delete
*/
[268] Fix | Delete
GIT_EXTERN(void) git_note_free(git_note *note);
[269] Fix | Delete
[270] Fix | Delete
/**
[271] Fix | Delete
* Get the default notes reference for a repository
[272] Fix | Delete
*
[273] Fix | Delete
* @param out buffer in which to store the name of the default notes reference
[274] Fix | Delete
* @param repo The Git repository
[275] Fix | Delete
*
[276] Fix | Delete
* @return 0 or an error code
[277] Fix | Delete
*/
[278] Fix | Delete
GIT_EXTERN(int) git_note_default_ref(git_buf *out, git_repository *repo);
[279] Fix | Delete
[280] Fix | Delete
/**
[281] Fix | Delete
* Loop over all the notes within a specified namespace
[282] Fix | Delete
* and issue a callback for each one.
[283] Fix | Delete
*
[284] Fix | Delete
* @param repo Repository where to find the notes.
[285] Fix | Delete
*
[286] Fix | Delete
* @param notes_ref Reference to read from (optional); defaults to
[287] Fix | Delete
* "refs/notes/commits".
[288] Fix | Delete
*
[289] Fix | Delete
* @param note_cb Callback to invoke per found annotation. Return non-zero
[290] Fix | Delete
* to stop looping.
[291] Fix | Delete
*
[292] Fix | Delete
* @param payload Extra parameter to callback function.
[293] Fix | Delete
*
[294] Fix | Delete
* @return 0 on success, non-zero callback return value, or error code
[295] Fix | Delete
*/
[296] Fix | Delete
GIT_EXTERN(int) git_note_foreach(
[297] Fix | Delete
git_repository *repo,
[298] Fix | Delete
const char *notes_ref,
[299] Fix | Delete
git_note_foreach_cb note_cb,
[300] Fix | Delete
void *payload);
[301] Fix | Delete
[302] Fix | Delete
/** @} */
[303] Fix | Delete
GIT_END_DECL
[304] Fix | Delete
#endif
[305] Fix | Delete
[306] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function