Skip to content

Latest commit

 

History

History
135 lines (104 loc) · 3.8 KB

File metadata and controls

135 lines (104 loc) · 3.8 KB
layout default
menu_item api
title Reflog
description Version 0.26.1
return_to
API Documentation Index
/api/
sections
delete read rename #append #drop #entryByIndex #entrycount #write
#delete
#read
#rename
#append
#drop
#entryByIndex
#entrycount
#write

Reflog.delete SyncExperimental

var result = Reflog.delete(repo, name);
Parameters Type
repo Repository the repository
name String the reflog to delete
Returns
Number 0 or an error code

Reflog.read AsyncExperimental

Reflog.read(repo, name).then(function(reflog) {
  // Use reflog
});
Parameters Type
repo Repository the repostiory
name String reference to look up
Returns
Reflog

Reflog.rename SyncExperimental

var result = Reflog.rename(repo, old_name, name);
Parameters Type
repo Repository the repository
old_name String the old name of the reference
name String the new name of the reference
Returns
Number 0 on success, GIT_EINVALIDSPEC or an error code

Reflog#append SyncExperimental

var result = reflog.append(id, committer, msg);

| Parameters | Type | | --- | --- | --- | | id | Oid | the OID the reference is now pointing to | | committer | Signature | the signature of the committer | | msg | String | the reflog message |

Returns
Number 0 or an error code

Reflog#drop SyncExperimental

var result = reflog.drop(idx, rewrite_previous_entry);

| Parameters | Type | | --- | --- | --- | | idx | Number | the position of the entry to remove. Should be greater than or equal to 0 (zero) and less than git_reflog_entrycount(). | | rewrite_previous_entry | Number | 1 to rewrite the history; 0 otherwise. |

Returns
Number 0 on success, GIT_ENOTFOUND if the entry doesn't exist
or an error code.

Reflog#entryByIndex SyncExperimental

var reflogEntry = reflog.entryByIndex(idx);

| Parameters | Type | | --- | --- | --- | | idx | Number | the position of the entry to lookup. Should be greater than or equal to 0 (zero) and less than git_reflog_entrycount(). |

Returns
ReflogEntry the entry; NULL if not found

Reflog#entrycount SyncExperimental

var result = reflog.entrycount();
Returns
Number the number of log entries

Reflog#write AsyncExperimental

reflog.write().then(function(result) {
  // Use result
});
Returns
Number 0 or an error code