summaryrefslogtreecommitdiff
path: root/src/refdb.h
Commit message (Collapse)AuthorAgeFilesLines
* Introduce reference transactionsCarlos Martín Nieto2014-09-301-1/+2
| | | | | | | | | A transaction allows you to lock multiple references and set up changes for them before applying the changes all at once (or as close as the backend supports). This can be used for replication purposes, or for making sure some operations run when the reference is locked and thus cannot be changed.
* refs: placeholder conditional deleteCarlos Martín Nieto2014-02-051-1/+1
| | | | We don't actually pass the old value yet.
* refdb: add conditional symbolic updatesCarlos Martín Nieto2014-02-051-1/+1
| | | | | Add a parameter to the backend to allow checking for the old symbolic target.
* refs: conditional ref updatesCarlos Martín Nieto2014-02-051-1/+1
| | | | Allow updating references if the old value matches the given one.
* refs: expose has_log() on the backendCarlos Martín Nieto2013-12-091-0/+1
| | | | | | The frontend used to look at the file directly, but that's obviously not the right thing to do. Expose it on the backend and use that function instead.
* refs: expose a way to ensure a ref has a logCarlos Martín Nieto2013-12-091-0/+3
| | | | | | Sometimes (e.g. stash) we want to make sure that a log will be written, even if it's not in one of the standard locations. Let's make that easier.
* reflog: integrate into the ref writingCarlos Martín Nieto2013-11-231-1/+2
| | | | | | | | | | | | Whenever a reference is created or updated, we need to write to the reflog regardless of whether the user gave us a message, so we shouldn't leave that to the ref frontend, but integrate it into the backend. This also eliminates the race between ref update and writing to the reflog, as we protect the reflog with the ref lock. As an additional benefit, this reflog append on the backend happens by appending to the file instead of parsing and rewriting it.
* refdb: add a `message` parameter for appending to the logCarlos Martín Nieto2013-11-231-2/+3
| | | | This is as yet unused.
* reflog: move the reflog implementation into refdb_fsCarlos Martín Nieto2013-10-021-0/+4
| | | | | | | | | | References and their logs are logically coupled, let's make it so in the code by moving the fs-based reflog implementation to live next to the fs-based refs one. As part of the change, make the function take names rather than references, as only the names are relevant when looking up and handling reflogs.
* RefcountingVicent Marti2013-05-301-0/+2
|
* ...Aaaand this worksVicent Marti2013-05-301-2/+9
|
* What are the chances, reallyVicent Marti2013-05-291-4/+3
|
* Liike thisVicent Marti2013-05-281-1/+1
|
* Introduce a glob-filtering iteratorCarlos Martín Nieto2013-05-111-0/+1
| | | | | If the backend doesn't provide support for it, the matching is done in refdb on top of a normal iterator.
* refs: remove the OID/SYMBOLIC filteringCarlos Martín Nieto2013-05-111-13/+0
| | | | | | | | | Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
* refs: introduce an iteratorCarlos Martín Nieto2013-05-111-0/+4
| | | | This allows us to get a list of reference names in a loop instead of callbacks.
* Move git_reference__alloc to include/git2/sysRussell Belfer2013-04-211-1/+1
| | | | | | Create a new include/git2/sys/refs.h and move the reference alloc functions there. Also fix some documentation issues and some minor code cleanups.
* immutable references and a pluggable ref databaseEdward Thomson2013-03-071-0/+46