Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/imh-pyth.../include/git2
File: reflog.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_reflog_h__
[6] Fix | Delete
#define INCLUDE_git_reflog_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
#include "oid.h"
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @file git2/reflog.h
[14] Fix | Delete
* @brief Git reflog management routines
[15] Fix | Delete
* @defgroup git_reflog Git reflog management routines
[16] Fix | Delete
* @ingroup Git
[17] Fix | Delete
* @{
[18] Fix | Delete
*/
[19] Fix | Delete
GIT_BEGIN_DECL
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Read the reflog for the given reference
[23] Fix | Delete
*
[24] Fix | Delete
* If there is no reflog file for the given
[25] Fix | Delete
* reference yet, an empty reflog object will
[26] Fix | Delete
* be returned.
[27] Fix | Delete
*
[28] Fix | Delete
* The reflog must be freed manually by using
[29] Fix | Delete
* git_reflog_free().
[30] Fix | Delete
*
[31] Fix | Delete
* @param out pointer to reflog
[32] Fix | Delete
* @param repo the repostiory
[33] Fix | Delete
* @param name reference to look up
[34] Fix | Delete
* @return 0 or an error code
[35] Fix | Delete
*/
[36] Fix | Delete
GIT_EXTERN(int) git_reflog_read(git_reflog **out, git_repository *repo, const char *name);
[37] Fix | Delete
[38] Fix | Delete
/**
[39] Fix | Delete
* Write an existing in-memory reflog object back to disk
[40] Fix | Delete
* using an atomic file lock.
[41] Fix | Delete
*
[42] Fix | Delete
* @param reflog an existing reflog object
[43] Fix | Delete
* @return 0 or an error code
[44] Fix | Delete
*/
[45] Fix | Delete
GIT_EXTERN(int) git_reflog_write(git_reflog *reflog);
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Add a new entry to the in-memory reflog.
[49] Fix | Delete
*
[50] Fix | Delete
* `msg` is optional and can be NULL.
[51] Fix | Delete
*
[52] Fix | Delete
* @param reflog an existing reflog object
[53] Fix | Delete
* @param id the OID the reference is now pointing to
[54] Fix | Delete
* @param committer the signature of the committer
[55] Fix | Delete
* @param msg the reflog message
[56] Fix | Delete
* @return 0 or an error code
[57] Fix | Delete
*/
[58] Fix | Delete
GIT_EXTERN(int) git_reflog_append(git_reflog *reflog, const git_oid *id, const git_signature *committer, const char *msg);
[59] Fix | Delete
[60] Fix | Delete
/**
[61] Fix | Delete
* Rename a reflog
[62] Fix | Delete
*
[63] Fix | Delete
* The reflog to be renamed is expected to already exist
[64] Fix | Delete
*
[65] Fix | Delete
* The new name will be checked for validity.
[66] Fix | Delete
* See `git_reference_create_symbolic()` for rules about valid names.
[67] Fix | Delete
*
[68] Fix | Delete
* @param repo the repository
[69] Fix | Delete
* @param old_name the old name of the reference
[70] Fix | Delete
* @param name the new name of the reference
[71] Fix | Delete
* @return 0 on success, GIT_EINVALIDSPEC or an error code
[72] Fix | Delete
*/
[73] Fix | Delete
GIT_EXTERN(int) git_reflog_rename(git_repository *repo, const char *old_name, const char *name);
[74] Fix | Delete
[75] Fix | Delete
/**
[76] Fix | Delete
* Delete the reflog for the given reference
[77] Fix | Delete
*
[78] Fix | Delete
* @param repo the repository
[79] Fix | Delete
* @param name the reflog to delete
[80] Fix | Delete
* @return 0 or an error code
[81] Fix | Delete
*/
[82] Fix | Delete
GIT_EXTERN(int) git_reflog_delete(git_repository *repo, const char *name);
[83] Fix | Delete
[84] Fix | Delete
/**
[85] Fix | Delete
* Get the number of log entries in a reflog
[86] Fix | Delete
*
[87] Fix | Delete
* @param reflog the previously loaded reflog
[88] Fix | Delete
* @return the number of log entries
[89] Fix | Delete
*/
[90] Fix | Delete
GIT_EXTERN(size_t) git_reflog_entrycount(git_reflog *reflog);
[91] Fix | Delete
[92] Fix | Delete
/**
[93] Fix | Delete
* Lookup an entry by its index
[94] Fix | Delete
*
[95] Fix | Delete
* Requesting the reflog entry with an index of 0 (zero) will
[96] Fix | Delete
* return the most recently created entry.
[97] Fix | Delete
*
[98] Fix | Delete
* @param reflog a previously loaded reflog
[99] Fix | Delete
* @param idx the position of the entry to lookup. Should be greater than or
[100] Fix | Delete
* equal to 0 (zero) and less than `git_reflog_entrycount()`.
[101] Fix | Delete
* @return the entry; NULL if not found
[102] Fix | Delete
*/
[103] Fix | Delete
GIT_EXTERN(const git_reflog_entry *) git_reflog_entry_byindex(const git_reflog *reflog, size_t idx);
[104] Fix | Delete
[105] Fix | Delete
/**
[106] Fix | Delete
* Remove an entry from the reflog by its index
[107] Fix | Delete
*
[108] Fix | Delete
* To ensure there's no gap in the log history, set `rewrite_previous_entry`
[109] Fix | Delete
* param value to 1. When deleting entry `n`, member old_oid of entry `n-1`
[110] Fix | Delete
* (if any) will be updated with the value of member new_oid of entry `n+1`.
[111] Fix | Delete
*
[112] Fix | Delete
* @param reflog a previously loaded reflog.
[113] Fix | Delete
*
[114] Fix | Delete
* @param idx the position of the entry to remove. Should be greater than or
[115] Fix | Delete
* equal to 0 (zero) and less than `git_reflog_entrycount()`.
[116] Fix | Delete
*
[117] Fix | Delete
* @param rewrite_previous_entry 1 to rewrite the history; 0 otherwise.
[118] Fix | Delete
*
[119] Fix | Delete
* @return 0 on success, GIT_ENOTFOUND if the entry doesn't exist
[120] Fix | Delete
* or an error code.
[121] Fix | Delete
*/
[122] Fix | Delete
GIT_EXTERN(int) git_reflog_drop(
[123] Fix | Delete
git_reflog *reflog,
[124] Fix | Delete
size_t idx,
[125] Fix | Delete
int rewrite_previous_entry);
[126] Fix | Delete
[127] Fix | Delete
/**
[128] Fix | Delete
* Get the old oid
[129] Fix | Delete
*
[130] Fix | Delete
* @param entry a reflog entry
[131] Fix | Delete
* @return the old oid
[132] Fix | Delete
*/
[133] Fix | Delete
GIT_EXTERN(const git_oid *) git_reflog_entry_id_old(const git_reflog_entry *entry);
[134] Fix | Delete
[135] Fix | Delete
/**
[136] Fix | Delete
* Get the new oid
[137] Fix | Delete
*
[138] Fix | Delete
* @param entry a reflog entry
[139] Fix | Delete
* @return the new oid at this time
[140] Fix | Delete
*/
[141] Fix | Delete
GIT_EXTERN(const git_oid *) git_reflog_entry_id_new(const git_reflog_entry *entry);
[142] Fix | Delete
[143] Fix | Delete
/**
[144] Fix | Delete
* Get the committer of this entry
[145] Fix | Delete
*
[146] Fix | Delete
* @param entry a reflog entry
[147] Fix | Delete
* @return the committer
[148] Fix | Delete
*/
[149] Fix | Delete
GIT_EXTERN(const git_signature *) git_reflog_entry_committer(const git_reflog_entry *entry);
[150] Fix | Delete
[151] Fix | Delete
/**
[152] Fix | Delete
* Get the log message
[153] Fix | Delete
*
[154] Fix | Delete
* @param entry a reflog entry
[155] Fix | Delete
* @return the log msg
[156] Fix | Delete
*/
[157] Fix | Delete
GIT_EXTERN(const char *) git_reflog_entry_message(const git_reflog_entry *entry);
[158] Fix | Delete
[159] Fix | Delete
/**
[160] Fix | Delete
* Free the reflog
[161] Fix | Delete
*
[162] Fix | Delete
* @param reflog reflog to free
[163] Fix | Delete
*/
[164] Fix | Delete
GIT_EXTERN(void) git_reflog_free(git_reflog *reflog);
[165] Fix | Delete
[166] Fix | Delete
/** @} */
[167] Fix | Delete
GIT_END_DECL
[168] Fix | Delete
#endif
[169] Fix | Delete
[170] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function