Commit Graph

6 Commits

Author SHA1 Message Date
Carlos Martín Nieto
e54cfb9b54 odb: free object data when id is ambiguous
By the time we recognise this as an ambiguous id, the object's data
has been loaded into memory. Free it when returning EABMIGUOUS.
2013-08-12 11:50:27 +02:00
Brodie Rao
d19bcb3352 odb_pack: handle duplicate objects from different packs
This is based on 24634c6fd0.

This also corrects an issue with error codes being mixed up with the
number of found objects.
2013-08-08 00:41:16 -07:00
Russell Belfer
437224b4b9 More tests for ambiguous OIDs across packs
The test coverage for ambiguous OIDs was pretty thin.  This adds
a bunch of new objects both in packs, across packs, and loose that
match to 8 characters so that we can test various cases of
ambiguous lookups.
2013-08-05 21:46:32 -07:00
Sascha Cunz
9094d30b93 Reset all static variables to NULL in clar's __cleanup
Without this change, any failed assertion in the second (or a later) test
inside a test suite has a chance of double deleting memory, resulting in
a heap corruption. See #1096 for details.

This leaves alone the test cases where we "just" use cl_git_sandbox_init()
and cl_git_sandbox_cleanup(). These methods already take good care to not
double delete a repository.

Fixes #1096
2012-11-23 11:41:56 +01: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