Commit Graph

19 Commits

Author SHA1 Message Date
Edward Thomson
617bb17556 calloc refs instead of malloc'ing them 2013-05-09 17:44:44 +02:00
Jeff King
a591ed3ea9 refdb_fs: respect PEELING_STANDARD
We only set our negative flag for PEELING_FULL; we can fall
back to the lesser PEELING_STANDARD if our ref is in the
refs/tags/ hierarchy.
2013-05-02 12:06:46 -04:00
Vicent Marti
822645f629 refdb_fs: Only strstr the traits line 2013-05-02 17:48:49 +02:00
Vicent Marti
1022db2b68 refdb_fs: Traits are always surrounded by spaces
This makes parsing easier! :p
2013-05-02 17:42:09 +02:00
Vicent Marti
f69db390fb refdb_fs: store "cannot be peeled" flag for packed refs
Fixes #1532
2013-05-02 17:39:14 +02:00
Vicent Marti
3bb00f3360 refdb_fs: implement the fully-peeled trait 2013-05-02 17:17:46 +02:00
Jeff King
7edb9071da refdb_fs: do not require peeled packed refs to be tags
Older versions of git would only write peeled entries for
items under refs/tags/. Newer versions will write them for
all refs, and we should be prepared to handle that.
2013-05-02 11:07:20 -04:00
Vicent Marti
8cddf9b83a refdb: Properly load namespaces 2013-05-01 19:13:32 +02:00
Vicent Marti
2ba55c1f0d refdb: Proper namespace root 2013-05-01 15:20:08 +02:00
Vicent Marti
bade51948c lol namespaces 2013-04-30 21:02:13 +02:00
Vicent Marti
a5de904427 refs: Better error name 2013-04-23 02:24:44 +02:00
Russell Belfer
5360786885 Further threading fixes
This builds on the earlier thread safety work to make it so that
setting the odb, index, refdb, or config for a repository is done
in a threadsafe manner with minimized locking time.  This is done
by adding a lock to the repository object and using it to guard
the assignment of the above listed pointers.  The lock is only
held to assign the pointer value.

This also contains some minor fixes to the other work with pack
files to reduce the time that locks are being held to and fix an
apparently memory leak.
2013-04-22 16:52:07 +02:00
Russell Belfer
21ca045100 Move git_reference__alloc to include/git2/sys
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.
2013-04-21 12:52:17 -07:00
Russell Belfer
4dcd878019 Move refdb_backend to include/git2/sys
This moves most of the refdb stuff over to the include/git2/sys
directory, with some minor shifts in function organization.

While I was making the necessary updates, I also removed the
trailing whitespace in a few files that I modified just because I
was there and it was bugging me.
2013-04-21 11:57:21 -07:00
Edward Thomson
4e4eab52f7 alloc doesn't take a refdb; git_refdb_free nicely in the tests 2013-04-19 18:43:17 -05:00
Vicent Marti
fedd0f9e90 refs: Do not union the peel 2013-04-17 23:29:34 +02:00
Vicent Marti
3be933b143 refs: Add git_referene_target_peel 2013-04-17 17:33:51 +02:00
Arkadiy Shapkin
10c06114cb Several warnings detected by static code analyzer fixed
Implicit type conversion argument of function to size_t type
Suspicious sequence of types castings: size_t -> int -> size_t
Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)'
Unsigned type is never < 0
2013-03-18 03:30:26 +04:00
Edward Thomson
d00d54645d immutable references and a pluggable ref database 2013-03-07 11:01:52 -06:00