The constructor to git_repository is now called
'git_repository_open(path)'
and takes a path to a git repository instead of an existing ODB object.
Unit tests have been updated accordingly and the two test repositories
have been merged into one.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
In particular, msvc complains thus:
t0603-sort.c(23) : warning C4244: 'function' : conversion from \
'time_t' to 'unsigned int', possible loss of data
Note that msvc, by default, defines time_t as a 64-bit type, whereas
srand() is expecting an (32-bit) unsigned int. In order to suppress
the warning, we simply cast the return value of the time() function
call to 'unsigned int'.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Three new unit tests, t06XX files have been added.
t0601-read: tests for loading index files from disk,
for creating in-memory indexes and for accessing
index entries.
t0602-write: tests for writing index files back to disk
t0603-sort: tests for properly sorting the entries array of an index
Two test indexes have been added in 'tests/resources/':
test/resources/index: a sample index from a libgit2 repository
test/resources/gitgit.index: a sample index from a git.git
repository (includes TREE extension data)
Signed-off-by: Vicent Marti <tanoku@gmail.com>