Reflog support #730
Loading…
Reference in New Issue
No description provided.
Delete Branch "pokstad/reflog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds support and tests for all reflog functions listed on https://libgit2.org/libgit2/#HEAD/group/reflog.
Closes #467
sorry for the delay! for some reason i saw this, accidentally marked as read and completely forgot about it until today u_u
@ -0,0 +26,4 @@
return l
}
func (repo *Repository) ReadReflog(name string) (*Reflog, error) {
in order for these functions to be more easy to find in the docs, what do you think about modelling this similar to the other *Collection structs in https://godoc.org/github.com/libgit2/git2go#Repository? (i.e. there would be an
Reflogs ReflogCollection
). That way folks can dorepo.Reflogs.Read("name")
andrepo.Reflogs.Delete("name")
.also, i know we have not been super diligent about this, but could all public methods being introduced have a docstring? the godocs need a bit of love ^^;;
@ -0,0 +117,4 @@
}
}
func (l *Reflog) EntryByIndex(index uint) *ReflogEntry {
would it be possible to make this the widest size for any architecture that we support today? supporting more than 2^32 entries might be silly, but i'd rather be safe than sorry.
same in all the other places that use
size_t
in the C api.@ -0,0 +136,4 @@
runtime.LockOSThread()
defer runtime.UnlockOSThread()
var rewriteHistoryInt int
might as well define it as
C.int
from the get-go to avoid the cast in L144.@ -0,0 +163,4 @@
cMsg := C.CString(message)
defer C.free(unsafe.Pointer(cMsg))
C.git_reflog_append(l.ptr, oid.toC(), cSignature, cMsg)
can the error be handled?
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.