summaryrefslogtreecommitdiff
path: root/index.go
AgeCommit message (Collapse)Author
2021-09-05The big Callback type adjustment of 2020lhchavez
This change makes all callbacks that can fail return an `error`. This makes things a lot more idiomatic.
2021-09-05Make all non-user-creatable structures non-comparable (#802)lhchavez
This change makes all non-user-creatable structures non-comparable. This makes it easier to add changes later that don't introduce breaking changes from the go compatibility guarantees perspective. This, of course, implies that this change _is_ a breaking change, but since these structures are not intended to be created by users (or de-referenced), it should be okay.
2021-02-15Make index time fields public (#750)michael boulton
From gorelease: ``` Compatible changes: - IndexTime.Nanoseconds: added - IndexTime.Seconds: added ``` There are no extra tests because there isn't really anything to test closes #304
2020-12-05Refactor all callbacks (#700)lhchavez
This change is a preparation for another change that makes all callback types return a Go error instead of an error code / an integer. That is going to make make things a lot more idiomatic. The reason this change is split is threefold: a) This change is mostly mechanical and should contain no semantic changes. b) This change is backwards-compatible (in the Go API compatibility sense of the word), and thus can be backported to all other releases. c) It makes the other change a bit smaller and more focused on just one thing. Concretely, this change makes all callbacks populate a Go error when they fail. If the callback is invoked from the same stack as the function to which it was passed (e.g. for `Tree.Walk`), it will preserve the error object directly into a struct that also holds the callback function. Otherwise if the callback is pased to one func and will be invoked when run from another one (e.g. for `Repository.InitRebase`), the error string is saved into the libgit2 thread-local storage and then re-created as a `GitError`.
2020-12-05Mark some symbols to be deprecated #minor (#698)lhchavez
This change introduces the file deprecated.go, which contains any constants, functions, and types that are slated to be deprecated in the next major release. These symbols are deprecated because they refer to old spellings in pre-1.0 libgit2. This also makes the build be done with the `-DDEPRECATE_HARD` flag to avoid regressions. This, together with [gorelease](https://godoc.org/golang.org/x/exp/cmd/gorelease)[1] should make releases safer going forward. 1: More information about how that works at https://go.googlesource.com/exp/+/refs/heads/master/apidiff/README.md
2020-05-09refactor: Rename methods with Get prefixSuhaib Mujahid
It is not Go idiomatic to put Get into the getter's name. https: //golang.org/doc/effective_go.html#Getters Co-Authored-By: lhchavez <[email protected]>
2020-02-23Update the method namelhchavez
2020-02-23Merge remote-tracking branch 'upstream/master' into git_index_add_frombufferlhchavez
2018-10-25Add index.Clear() to clear the index objectMelvin
2017-07-17Add binding for `git_index_add_frombuffer`Vadzim Ramanenka
2017-07-08Second round of keep-alivesCarlos Martín Nieto
2016-10-20Implement git_index_remove_directory in index wrapperezwiebel
2016-02-15Merge remote-tracking branch 'upstream/master' into nextCarlos Martín Nieto
2015-12-21Add Index.Find() and Index.FindPrefix()FUJII Ryota
2015-12-16Fix a memory leak in Index.EntryByPath()FUJII Ryota
2015-10-27Fix memory leaks in NewIndex() and OpenIndex()FUJII Ryota
2015-10-26Update libgit2 to 821131fCalin Seciu
The API changes are: - `*Remote.Connect` ```go // from: func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks) error // to: func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks, headers []string) error ``` - `*Remote.ConnectFetch` - `headers` was added as above - `*Remote.ConnectPush` - `headers` was added as above
2015-09-28Add EntryByPath method to IndexFUJII Ryota
2015-08-31Run go fmtCarlos Martín Nieto
As it seems to be something that many people can't get over, reformat all the files; as we're breaking things, whoever depended on 'next' will have to take many changes into account anyway, so let's include this to reduce the noise of incoming patches.
2015-06-08Update to libgit2 b6011e29Carlos Martín Nieto
2015-05-22handles: panic when we cannot retrieve handle dataPatrick Steinhardt
2015-05-22index: use HandleList for C function callbacks.Patrick Steinhardt
2015-05-19Index: Add Path() accessorCarlos Martín Nieto
2015-05-19Index: Add OpenIndexCarlos Martín Nieto
This lets you persist an index at an arbitrary location.
2015-05-19Index: Add ReadTree()Carlos Martín Nieto
2015-03-23Add a FIXME.Mark Probst
2014-12-11Remove useless includesCarlos Martín Nieto
2014-10-25Merge pull request #125 from lucas-clemente/masterCarlos Martín Nieto
implemented Index.AddAll as git_index_add_all wrapper
2014-10-24implemented Index.AddAll, Index.RemoveAll, Index.UpdateAllLucas Clemente
2014-10-20Use Filemode type in TreeEntry and IndexEntryRyan Dahl
Fixes #121
2014-09-07add Index#RemoveByPath.Daniel Kertesz
2014-05-25Index: add functions to handle the data structureCarlos Martín Nieto
Index is not just the index file
2014-04-02make it possible to handle errorsJesse Ezell
2014-03-30add conflict functionsJesse Ezell
2014-03-20Add index WriteTreeTo + testJesse Ezell
2014-02-26Convert the rest of the errorsCarlos Martín Nieto
2014-02-26Added git error code to the error object.Jesper Hansen
2014-02-26Merge branch 'index-entries'Carlos Martín Nieto
2014-02-26Adjust to oid -> idCarlos Martín Nieto
2014-02-26Remove pointer to git_index_entryCarlos Martín Nieto
We have all the data
2014-01-24added write methodTobias Haar
2013-12-18Lock the OS thread when acessing errorsCarlos Martín Nieto
The library stores error information in thread-local storage, which means we need to make sure that the Go runtime doesn't switch OS threads between the time we call a function and th time we attempt to retrieve the error information.
2013-11-14Don't repeat the pkg-config lineCarlos Martín Nieto
This is only needed once per package. Having it on every file makes the build system ask about it n times, which is silly.
2013-05-22Support for index-entriesAxel Wagner
2013-03-06Wrap git_indexCarlos Martín Nieto