Commit Graph

12 Commits

Author SHA1 Message Date
Michael Schubert
8060cdc93c revwalk: fix off-by-one error
Fixes #921.
2012-09-27 19:12:01 +02:00
Vicent Marti
81f73a872c test: Open ODB on each test suite 2012-08-06 12:53:09 +02:00
Vicent Marti
51e1d80846 Merge remote-tracking branch 'arrbee/tree-walk-fixes' into development
Conflicts:
	src/notes.c
	src/transports/git.c
	src/transports/http.c
	src/transports/local.c
	tests-clar/odb/foreach.c
2012-08-06 12:41:08 +02:00
Russell Belfer
5dca201072 Update iterators for consistency across library
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:

* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
  (i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
  the library and `giterr_last()` will return NULL if called.

This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
2012-08-03 17:08:01 -07:00
Vicent Martí
bfb5916468 Merge pull request #833 from carlosmn/odb-one
odb: allow creating an ODB backend from a packfile index
2012-07-31 10:16:21 -07:00
nulltoken
1d733b573a odb: add some documentation to the foreach() test 2012-07-25 11:23:27 +02:00
Carlos Martín Nieto
507523c32f odb: allow creating an ODB backend from a packfile index
git_odb_backend_one_packfile() allows us to create an ODB backend out
of an .idx file.
2012-07-21 16:23:49 +02:00
Carlos Martín Nieto
eca67c585e tests: fix git_odb_foreach() object count
Some objects were added in another PR
2012-07-12 20:40:09 +02:00
Carlos Martín Nieto
521aedad30 odb: add git_odb_foreach()
Go through each backend and list every objects that exists in
them. This allows fsck-like uses.
2012-07-03 12:50:51 +02:00
Vicent Martí
eb27088462 clar: Fix warning 2012-05-16 19:24:35 +02:00
Han-Wen Nienhuys
24634c6fd0 Handle duplicate objects from different backends in git_odb_read_prefix(). 2012-05-12 15:50:19 -03:00
Vicent Martí
3fd1520cd4 Rename the Clay test suite to Clar
Clay is the name of a programming language on the makings, and we want
to avoid confusions. Sorry for the huge diff!
2012-01-24 20:35:15 -08:00