Reflog.delete
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
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
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
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
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
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
var result = reflog.entrycount();
| Returns | |
|---|---|
| Number | the number of log entries |
Reflog#write
reflog.write().then(function(result) {
// Use result
});
| Returns | |
|---|---|
| Number | 0 or an error code |