]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agoTrim leading colon from ssh repository path
Isaac Kearse [Sun, 8 Sep 2013 02:11:08 +0000 (14:11 +1200)]
Trim leading colon from ssh repository path

11 years agoMerge pull request #1836 from libgit2/ntk/fix/leaks
Vicent Martí [Sat, 7 Sep 2013 16:18:56 +0000 (09:18 -0700)]
Merge pull request #1836 from libgit2/ntk/fix/leaks

Fix memory leaks

11 years agoMerge pull request #1835 from libgit2/ntk/fix/less_backend_calls_on_revparsing
Vicent Martí [Sat, 7 Sep 2013 16:18:44 +0000 (09:18 -0700)]
Merge pull request #1835 from libgit2/ntk/fix/less_backend_calls_on_revparsing

Some revparse love

11 years agotests: Fix memory leaks
nulltoken [Sat, 7 Sep 2013 15:51:24 +0000 (17:51 +0200)]
tests: Fix memory leaks

11 years agorevparse: Simplify error handling
nulltoken [Sat, 7 Sep 2013 15:31:30 +0000 (17:31 +0200)]
revparse: Simplify error handling

11 years agorevparse: Prevent unnecessary odb backend calls
nulltoken [Sat, 7 Sep 2013 15:21:41 +0000 (17:21 +0200)]
revparse: Prevent unnecessary odb backend calls

11 years agoMerge pull request #1791 from libgit2/cmn/revwalk-recursive
Russell Belfer [Fri, 6 Sep 2013 21:20:51 +0000 (14:20 -0700)]
Merge pull request #1791 from libgit2/cmn/revwalk-recursive

revwalk: make mark_unintersting use a loop

11 years agoMerge pull request #1815 from libgit2/ntk/topic/stream_write/check_before_overwriting
Russell Belfer [Fri, 6 Sep 2013 21:13:12 +0000 (14:13 -0700)]
Merge pull request #1815 from libgit2/ntk/topic/stream_write/check_before_overwriting

Ask the odbbackend if the object exists before overwriting it

11 years agoodb: Prevent stream_finalize_write() from overwriting
nulltoken [Thu, 29 Aug 2013 12:19:34 +0000 (14:19 +0200)]
odb: Prevent stream_finalize_write() from overwriting

Now that #1785 is merged, git_odb_stream_finalize_write() calculates the object id before invoking the odb backend.

This commit gives a chance to the backend to check if it already knows this object.

11 years agoblob: Slightly enforce a create_fromchunks() test
nulltoken [Thu, 29 Aug 2013 12:12:13 +0000 (14:12 +0200)]
blob: Slightly enforce a create_fromchunks() test

11 years agorevwalk: make mark_unintersting use a loop
Carlos Martín Nieto [Sat, 17 Aug 2013 05:58:55 +0000 (07:58 +0200)]
revwalk: make mark_unintersting use a loop

Using a recursive function can blow the stack when dealing with long
histories. Use a loop instead to limit the call chain depth.

This fixes #1223.

11 years agoMerge pull request #1829 from libgit2/fix-umask-fragility
Vicent Martí [Thu, 5 Sep 2013 23:56:21 +0000 (16:56 -0700)]
Merge pull request #1829 from libgit2/fix-umask-fragility

Fix umask fragility

11 years agoBetter macro name for is-exec-bit-set test
Russell Belfer [Thu, 5 Sep 2013 23:14:32 +0000 (16:14 -0700)]
Better macro name for is-exec-bit-set test

11 years agoGIT_MODE_TYPE should exclude setgid bits
Russell Belfer [Thu, 5 Sep 2013 19:01:17 +0000 (12:01 -0700)]
GIT_MODE_TYPE should exclude setgid bits

The GIT_MODE_TYPE macro was looking at all bits above the
permissions, but it should really just look at the top bits so
that it will give the right results for a setgid or setuid entry.

Since we're now using these macros in the tests, this was causing
a test failure on platforms that don't support setgid.

11 years agoFix tests of file modes
Russell Belfer [Thu, 5 Sep 2013 18:45:29 +0000 (11:45 -0700)]
Fix tests of file modes

This fixes an issue checking file modes in the tests that
initialize a repo from a template directory when a symlink is
used in the template.  Also, this updates some other places where
we are examining file modes to use the new macros.

11 years agoAdd more file mode permissions macros
Russell Belfer [Thu, 5 Sep 2013 18:20:12 +0000 (11:20 -0700)]
Add more file mode permissions macros

This adds some more macros for some standard operations on file
modes, particularly related to permissions, and then updates a
number of places around the code base to use the new macros.

11 years agoFix some newer GCC compiler warnings
Russell Belfer [Thu, 5 Sep 2013 17:25:16 +0000 (10:25 -0700)]
Fix some newer GCC compiler warnings

11 years agoMerge pull request #1831 from linquize/version.h-warning
Vicent Martí [Thu, 5 Sep 2013 13:30:08 +0000 (06:30 -0700)]
Merge pull request #1831 from linquize/version.h-warning

Fix warning in src/win32/version.h

11 years agoFix warning in src/win32/version.h
Linquize [Thu, 5 Sep 2013 12:42:47 +0000 (20:42 +0800)]
Fix warning in src/win32/version.h

11 years agoFix tests to use core.filemode correctly
Russell Belfer [Wed, 4 Sep 2013 23:41:34 +0000 (16:41 -0700)]
Fix tests to use core.filemode correctly

Some windows tests were failing

11 years ago_umask is function name on Windows
Russell Belfer [Wed, 4 Sep 2013 23:24:36 +0000 (16:24 -0700)]
_umask is function name on Windows

11 years agoClean up one other mode_t assertion
Russell Belfer [Wed, 4 Sep 2013 23:21:18 +0000 (16:21 -0700)]
Clean up one other mode_t assertion

11 years agoMake tests take umask into account
Russell Belfer [Wed, 4 Sep 2013 23:13:18 +0000 (16:13 -0700)]
Make tests take umask into account

It seems that libgit2 is correctly applying the umask when
initializing a repository from a template and when creating new
directories during checkout, but the test suite is not accounting
for possible variations due to the umask.  This updates that so
that the test suite will work regardless of the umask.

11 years agoUpdate clar
Russell Belfer [Wed, 4 Sep 2013 18:42:48 +0000 (11:42 -0700)]
Update clar

11 years agoTest pushing to remotes with "file:///" urls
Ben Straub [Wed, 4 Sep 2013 21:27:59 +0000 (14:27 -0700)]
Test pushing to remotes with "file:///" urls

11 years agoProvide better errors for push on non-bare local remotes
Ben Straub [Wed, 4 Sep 2013 20:07:42 +0000 (13:07 -0700)]
Provide better errors for push on non-bare local remotes

11 years agoMerge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilities
Vicent Martí [Wed, 4 Sep 2013 13:20:36 +0000 (06:20 -0700)]
Merge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilities

Of backends and refreshers...

11 years agoBackport @peff's fix for duplicates in sha1_lookup
Vicent Marti [Wed, 4 Sep 2013 11:16:57 +0000 (13:16 +0200)]
Backport @peff's fix for duplicates in sha1_lookup

11 years agoodb: Move the auto refresh logic to the pack backend
nulltoken [Fri, 30 Aug 2013 15:36:00 +0000 (17:36 +0200)]
odb: Move the auto refresh logic to the pack backend

Previously, `git_object_read()`, `git_object_read_prefix()` and
`git_object_exists()` were implementing an auto refresh logic. When the
expected object couldn't be found in any backend, a call to
`git_odb_refresh()` was triggered and the lookup was once again performed
against all backends.

This commit removes this auto-refresh logic from the odb layer and pushes
it down into the pack-backend (as it's the only one currently exposing
a `refresh()` endpoint).

11 years agoMerge pull request #1828 from libgit2/examples-cmakelists
Vicent Martí [Tue, 3 Sep 2013 22:54:45 +0000 (15:54 -0700)]
Merge pull request #1828 from libgit2/examples-cmakelists

Split examples CMakeLists.txt

11 years agoSplit examples CMakeLists.txt
Russell Belfer [Tue, 3 Sep 2013 22:14:04 +0000 (15:14 -0700)]
Split examples CMakeLists.txt

Also, this converts the examples/CMakeLists.txt from explicitly
listing to just globbing for all the individual C files.

11 years agoMerge pull request #1827 from libgit2/relative-path-win32-fix
Russell Belfer [Tue, 3 Sep 2013 22:19:13 +0000 (15:19 -0700)]
Merge pull request #1827 from libgit2/relative-path-win32-fix

Fix resolving relative windows network paths

11 years agoFix resolving relative windows network paths
Russell Belfer [Tue, 3 Sep 2013 21:00:27 +0000 (14:00 -0700)]
Fix resolving relative windows network paths

11 years agodon't use inline in tests for win32
Russell Belfer [Tue, 3 Sep 2013 19:33:34 +0000 (12:33 -0700)]
don't use inline in tests for win32

11 years agoMerge pull request #1804 from ethomson/rewrites
Vicent Martí [Tue, 3 Sep 2013 19:29:18 +0000 (12:29 -0700)]
Merge pull request #1804 from ethomson/rewrites

Minor changes for rewrites

11 years agoMerge pull request #1825 from nvloff/resolve_relative
Russell Belfer [Tue, 3 Sep 2013 19:27:56 +0000 (12:27 -0700)]
Merge pull request #1825 from nvloff/resolve_relative

path: properly resolve relative paths

11 years agopath: properly resolve relative paths
Nikolai Vladimirov [Tue, 3 Sep 2013 04:58:21 +0000 (07:58 +0300)]
path: properly resolve relative paths

11 years agoMerge pull request #1814 from libgit2/is-empty-fix
Vicent Martí [Tue, 3 Sep 2013 11:11:07 +0000 (04:11 -0700)]
Merge pull request #1814 from libgit2/is-empty-fix

Fix incorrect precedence within git_repository_is_empty()

11 years agoMerge pull request #1823 from kadamski/building4android
Vicent Martí [Mon, 2 Sep 2013 10:01:40 +0000 (03:01 -0700)]
Merge pull request #1823 from kadamski/building4android

Small changes enabling compiling libgit2 for Android.

11 years agoMerge pull request #1822 from kadamski/examples-cleanup
Vicent Martí [Sun, 1 Sep 2013 20:39:11 +0000 (13:39 -0700)]
Merge pull request #1822 from kadamski/examples-cleanup

Small cleanup in examples.

11 years agoAdd instructions about buiding for Android to README.md
Krzysztof Adamski [Sun, 1 Sep 2013 17:43:35 +0000 (19:43 +0200)]
Add instructions about buiding for Android to README.md

11 years agoBuild all example files if BUILD_EXAMPLES used.
Krzysztof Adamski [Sun, 1 Sep 2013 16:59:42 +0000 (18:59 +0200)]
Build all example files if BUILD_EXAMPLES used.

11 years agoAdding credentials callback to ls-remote and fetch too.
Krzysztof Adamski [Sun, 1 Sep 2013 16:35:39 +0000 (18:35 +0200)]
Adding credentials callback to ls-remote and fetch too.

11 years agoRemoving unneeded code duplication in ls-remote.c
Krzysztof Adamski [Sun, 1 Sep 2013 16:30:11 +0000 (18:30 +0200)]
Removing unneeded code duplication in ls-remote.c

11 years agoDefine S_IREAD i S_IWRITE for Android.
Krzysztof Adamski [Sun, 1 Sep 2013 16:53:07 +0000 (18:53 +0200)]
Define S_IREAD i S_IWRITE for Android.

11 years agoUse git__insertsort_r on Android too.
Krzysztof Adamski [Sun, 1 Sep 2013 16:47:56 +0000 (18:47 +0200)]
Use git__insertsort_r on Android too.

11 years agoCreate ANDROID build option
Krzysztof Adamski [Sun, 1 Sep 2013 16:45:36 +0000 (18:45 +0200)]
Create ANDROID build option

CMake seems not to support Android as a target and this option
lets us test this in CMakeLists.txt.

11 years agoMerge pull request #1820 from linquize/git_oid_streq
Vicent Martí [Sun, 1 Sep 2013 15:40:48 +0000 (08:40 -0700)]
Merge pull request #1820 from linquize/git_oid_streq

Update documentation of git_oid_streq to remove outdated error code

11 years agoMerge pull request #1819 from linquize/git_oid_shorten_add
Vicent Martí [Sun, 1 Sep 2013 15:40:10 +0000 (08:40 -0700)]
Merge pull request #1819 from linquize/git_oid_shorten_add

oid: git_oid_shorten_add() sets GITERR_INVALID when OID set is full

11 years agoPoint to the right Go bindings
Carlos Martín Nieto [Sat, 31 Aug 2013 15:42:38 +0000 (17:42 +0200)]
Point to the right Go bindings

11 years agoMerge pull request #1821 from n1rvana/development
Carlos Martín Nieto [Sat, 31 Aug 2013 15:40:49 +0000 (08:40 -0700)]
Merge pull request #1821 from n1rvana/development

Update readme to point to the currently maintained Erlang bindings.

11 years agoUpdate readme to point to the currently maintained Erlang bindings. Namely: https...
Nirvana [Sat, 31 Aug 2013 13:25:25 +0000 (09:25 -0400)]
Update readme to point to the currently maintained Erlang bindings. Namely: https://github.com/carlosmn/geef

11 years agooid: git_oid_shorten_add() sets GITERR_INVALID when OID set is full
Linquize [Sat, 31 Aug 2013 10:22:50 +0000 (18:22 +0800)]
oid: git_oid_shorten_add() sets GITERR_INVALID when OID set is full

11 years agoUpdate documentation of git_oid_streq to remove outdated error code
Linquize [Sat, 31 Aug 2013 10:19:44 +0000 (18:19 +0800)]
Update documentation of git_oid_streq to remove outdated error code

11 years agoodb: Code beautification
nulltoken [Fri, 30 Aug 2013 15:07:41 +0000 (17:07 +0200)]
odb: Code beautification

11 years agoodb: Honor the non refreshing capability of a backend
nulltoken [Fri, 30 Aug 2013 14:31:52 +0000 (16:31 +0200)]
odb: Honor the non refreshing capability of a backend

11 years agoTreat detached HEAD as non-empty repo
Russell Belfer [Thu, 29 Aug 2013 17:27:01 +0000 (10:27 -0700)]
Treat detached HEAD as non-empty repo

This simplifies the git_repository_is_empty a bit so that a
detached HEAD is just taken to mean the repo is not empty, since
a newly initialized repo will not have a detached HEAD.

11 years agorepository: Make the is_empty check more explicit
Vicent Martí [Thu, 29 Aug 2013 11:27:37 +0000 (13:27 +0200)]
repository: Make the is_empty check more explicit

11 years agoFix typo _delete -> _free
Carlos Martín Nieto [Thu, 29 Aug 2013 11:22:44 +0000 (13:22 +0200)]
Fix typo _delete -> _free

11 years agoFix incorrect precedence within git_repository_is_empty()
Justin Spahr-Summers [Thu, 29 Aug 2013 05:51:44 +0000 (22:51 -0700)]
Fix incorrect precedence within git_repository_is_empty()

Reverts part of 9146f1e57ec4f2b6fa293c78d54f1383464ff5be.

11 years agoAdd stddef include for sortedcache
Russell Belfer [Wed, 28 Aug 2013 18:20:47 +0000 (11:20 -0700)]
Add stddef include for sortedcache

All use of sortedcache will need this header, so put it in the
definition of the sortedcache API.

11 years agoMerge pull request #1805 from libgit2/threading-packed-load
Vicent Martí [Wed, 28 Aug 2013 16:38:14 +0000 (09:38 -0700)]
Merge pull request #1805 from libgit2/threading-packed-load

Thread safety for the refdb_fs

11 years agoSome documentation improvements
Russell Belfer [Wed, 28 Aug 2013 16:31:32 +0000 (09:31 -0700)]
Some documentation improvements

11 years agoSplit rewrites, status doesn't return rewrites
Edward Thomson [Wed, 21 Aug 2013 19:07:53 +0000 (14:07 -0500)]
Split rewrites, status doesn't return rewrites

Ensure that we apply splits to rewrites, even if we're not
interested in examining it closely for rename/copy detection.

In keeping with core git, status should not display rewrites,
it should simply show files as "modified".

11 years agoMerge pull request #1803 from libgit2/ntk/topic/even_more_lenient_remote_parsing
Vicent Martí [Wed, 28 Aug 2013 13:05:50 +0000 (06:05 -0700)]
Merge pull request #1803 from libgit2/ntk/topic/even_more_lenient_remote_parsing

Even more lenient remote parsing

11 years agoMerge pull request #1808 from frasertweedale/fix/freebsd-dup-include
Vicent Martí [Wed, 28 Aug 2013 13:05:07 +0000 (06:05 -0700)]
Merge pull request #1808 from frasertweedale/fix/freebsd-dup-include

netops: remove duplicate include

11 years agoMerge pull request #1772 from libgit2/config-iter
Vicent Martí [Wed, 28 Aug 2013 13:04:51 +0000 (06:04 -0700)]
Merge pull request #1772 from libgit2/config-iter

Configuration iterators redux

11 years agoMerge pull request #1812 from ethomson/version_check
Vicent Martí [Wed, 28 Aug 2013 02:26:54 +0000 (19:26 -0700)]
Merge pull request #1812 from ethomson/version_check

Windows XP updates

11 years agoImprove win32 version check, no ipv6 tests on XP
Edward Thomson [Wed, 28 Aug 2013 00:41:44 +0000 (19:41 -0500)]
Improve win32 version check, no ipv6 tests on XP

11 years agoConvert to our own SRWLOCK type on Win32
Russell Belfer [Tue, 27 Aug 2013 19:08:55 +0000 (12:08 -0700)]
Convert to our own SRWLOCK type on Win32

11 years agoremote: Make git_remote_list() detect pushurl
nulltoken [Tue, 27 Aug 2013 17:14:18 +0000 (19:14 +0200)]
remote: Make git_remote_list() detect pushurl

11 years agovector: Teach git_vector_uniq() to free while deduplicating
nulltoken [Tue, 27 Aug 2013 18:00:28 +0000 (20:00 +0200)]
vector: Teach git_vector_uniq() to free while deduplicating

11 years agoremote: Relax the parsing logic even more
nulltoken [Wed, 21 Aug 2013 14:04:25 +0000 (16:04 +0200)]
remote: Relax the parsing logic even more

In order to be loaded, a remote needs to be configured with at least a `url` or a `pushurl`.

ENOTFOUND will be returned when trying to git_remote_load() a remote with neither of these entries defined.

11 years agoremote: Don't parse missing urls as empty strings
nulltoken [Wed, 21 Aug 2013 11:37:21 +0000 (13:37 +0200)]
remote: Don't parse missing urls as empty strings

11 years agoremote: Warn the user when connecting with no url
nulltoken [Wed, 21 Aug 2013 11:20:17 +0000 (13:20 +0200)]
remote: Warn the user when connecting with no url

11 years agoremote: Assert proper GIT_DIRECTION_XXXX values
nulltoken [Wed, 21 Aug 2013 11:16:17 +0000 (13:16 +0200)]
remote: Assert proper GIT_DIRECTION_XXXX values

11 years agoFix MINGW SRWLock typedefs
Russell Belfer [Mon, 26 Aug 2013 22:17:35 +0000 (15:17 -0700)]
Fix MINGW SRWLock typedefs

11 years agoLoad SRWLock APIs at runtime
Russell Belfer [Mon, 26 Aug 2013 21:56:31 +0000 (14:56 -0700)]
Load SRWLock APIs at runtime

This loads SRWLock APIs at runtime and in their absence (i.e. on
Windows before Vista) falls back on a regular CRITICAL_SECTION
that will not permit concurrent readers.

11 years agoMerge pull request #1810 from nvloff/reference_is_tag
Vicent Martí [Mon, 26 Aug 2013 10:32:09 +0000 (03:32 -0700)]
Merge pull request #1810 from nvloff/reference_is_tag

refs: add git_reference_is_tag

11 years agorefs: add git_reference_is_tag
Nikolai Vladimirov [Sun, 25 Aug 2013 12:59:50 +0000 (15:59 +0300)]
refs: add git_reference_is_tag

11 years agoMerge pull request #1809 from frasertweedale/fix/git_push_unpack_ok-doc
Vicent Martí [Sun, 25 Aug 2013 10:39:06 +0000 (03:39 -0700)]
Merge pull request #1809 from frasertweedale/fix/git_push_unpack_ok-doc

push: small documentation fix

11 years agopush: small documentation fix
Fraser Tweedale [Sun, 25 Aug 2013 07:01:04 +0000 (17:01 +1000)]
push: small documentation fix

11 years agonetops: remove duplicate include
Fraser Tweedale [Sat, 24 Aug 2013 10:15:22 +0000 (20:15 +1000)]
netops: remove duplicate include

9e9aee6 added an include <netinet/in.h> to fix the build on FreeBSD.
Sometime since then the same header is included ifndef _WIN32, so
remove the duplicate include.

11 years agoMerge pull request #1807 from frasertweedale/fix/freebsd
Vicent Martí [Sat, 24 Aug 2013 09:43:38 +0000 (02:43 -0700)]
Merge pull request #1807 from frasertweedale/fix/freebsd

fix tests on FreeBSD

11 years agofix tests on FreeBSD
Fraser Tweedale [Sat, 24 Aug 2013 07:39:15 +0000 (17:39 +1000)]
fix tests on FreeBSD

238b761 introduced a test for posix behaviour, but on FreeBSD some
of the structs and constants used aren't defined in <arpa/inet.h>.
Include the appropriate headers to get the tests working again on
FreeBSD.

11 years agoFix comment
Russell Belfer [Mon, 19 Aug 2013 23:03:15 +0000 (16:03 -0700)]
Fix comment

11 years agoFix sortedcache docs and other feedback
Russell Belfer [Thu, 22 Aug 2013 22:44:34 +0000 (15:44 -0700)]
Fix sortedcache docs and other feedback

This converts an internal lock from a write lock to a read lock
where write isn't needed, and also clarifies some doc things about
where various locks are acquired and how various APIs are intended
to be used.

11 years agoTrying to fix Win32 warnings
Russell Belfer [Thu, 22 Aug 2013 21:45:10 +0000 (14:45 -0700)]
Trying to fix Win32 warnings

11 years agoDrop support for THREADSAFE on Windows XP
Russell Belfer [Thu, 22 Aug 2013 21:34:21 +0000 (14:34 -0700)]
Drop support for THREADSAFE on Windows XP

This makes libgit2 require Windows Vista or newer if it is going
to be compiled with the THREADSAFE option

11 years agoAdd SRWLock implementation of rwlocks for Win32
Russell Belfer [Thu, 22 Aug 2013 21:10:56 +0000 (14:10 -0700)]
Add SRWLock implementation of rwlocks for Win32

11 years agoA bit of item alignment paranoia
Russell Belfer [Thu, 22 Aug 2013 18:50:10 +0000 (11:50 -0700)]
A bit of item alignment paranoia

11 years agoConvert sortedcache to use rwlock
Russell Belfer [Thu, 22 Aug 2013 18:40:53 +0000 (11:40 -0700)]
Convert sortedcache to use rwlock

This is the first use we have of pthread_rwlock_t in libgit2.
Hopefully it won't cause any serious portability problems.

11 years agoImprove comments on locking for sortedcache APIs
Russell Belfer [Thu, 22 Aug 2013 05:50:37 +0000 (22:50 -0700)]
Improve comments on locking for sortedcache APIs

11 years agoNo need to lock newly created tgt in copy
Russell Belfer [Thu, 22 Aug 2013 05:44:56 +0000 (22:44 -0700)]
No need to lock newly created tgt in copy

11 years agoMerge pull request #1801 from ethomson/utf8_bom
Russell Belfer [Wed, 21 Aug 2013 23:57:45 +0000 (16:57 -0700)]
Merge pull request #1801 from ethomson/utf8_bom

Skip UTF-8 BOM in binary detection

11 years agoFix warnings when compiling without threads
Russell Belfer [Wed, 21 Aug 2013 23:50:03 +0000 (16:50 -0700)]
Fix warnings when compiling without threads

11 years agoRewrite refdb_fs using git_sortedcache object
Russell Belfer [Wed, 21 Aug 2013 23:26:32 +0000 (16:26 -0700)]
Rewrite refdb_fs using git_sortedcache object

This adds thread safety to the refdb_fs by using the new
git_sortedcache object and also by relaxing the handling of some
filesystem errors where the fs may be changed out from under us.

This also adds some new threading tests that hammer on the refdb.

11 years agoAdd internal ref set_name fn instead of realloc
Russell Belfer [Wed, 21 Aug 2013 21:10:27 +0000 (14:10 -0700)]
Add internal ref set_name fn instead of realloc

The refdb_fs implementation calls realloc directly on a reference
object when it wants to rename it.  It is not a public object, so
this doesn't mess with the immutability of references, but it does
assume certain constraints on the reference representation.  This
commit wraps that assumption in an isolated API to isolate it.

11 years agoAdd sortedcache APIs to lookup index and remove
Russell Belfer [Wed, 21 Aug 2013 21:09:38 +0000 (14:09 -0700)]
Add sortedcache APIs to lookup index and remove

This adds two other APIs that I need to the sortedcache type.

11 years agoAdd sorted cache data type
Russell Belfer [Tue, 20 Aug 2013 22:18:48 +0000 (15:18 -0700)]
Add sorted cache data type

This adds a convenient new data type for caching the contents of
file in memory when each item in that file corresponds to a name
and you need to both be able to lookup items by name and iterate
over them in some sorted order.  The new data type has locks in
place to manage usage in a threaded environment.