Commit Graph

5349 Commits

Author SHA1 Message Date
Carlos Martín Nieto
f2cda906e5 Point to the right Go bindings 2013-08-31 17:42:38 +02:00
Carlos Martín Nieto
749871c240 Merge pull request #1821 from n1rvana/development
Update readme to point to the currently maintained Erlang bindings.
2013-08-31 08:40:49 -07:00
Nirvana
a402179ae5 Update readme to point to the currently maintained Erlang bindings. Namely: https://github.com/carlosmn/geef 2013-08-31 09:25:25 -04:00
Carlos Martín Nieto
0001c02316 Fix typo _delete -> _free 2013-08-29 13:22:44 +02:00
Russell Belfer
19b9a09209 Add stddef include for sortedcache
All use of sortedcache will need this header, so put it in the
definition of the sortedcache API.
2013-08-28 11:20:47 -07:00
Vicent Martí
dbecec37a7 Merge pull request #1805 from libgit2/threading-packed-load
Thread safety for the refdb_fs
2013-08-28 09:38:14 -07:00
Russell Belfer
b2d3efcbce Some documentation improvements 2013-08-28 09:31:32 -07:00
Vicent Martí
1ef05e3f0e Merge pull request #1803 from libgit2/ntk/topic/even_more_lenient_remote_parsing
Even more lenient remote parsing
2013-08-28 06:05:50 -07:00
Vicent Martí
d07cc8a2f7 Merge pull request #1808 from frasertweedale/fix/freebsd-dup-include
netops: remove duplicate include
2013-08-28 06:05:07 -07:00
Vicent Martí
b8b22d774e Merge pull request #1772 from libgit2/config-iter
Configuration iterators redux
2013-08-28 06:04:51 -07:00
Vicent Martí
21a3bbe419 Merge pull request #1812 from ethomson/version_check
Windows XP updates
2013-08-27 19:26:54 -07:00
Edward Thomson
1ff3a09415 Improve win32 version check, no ipv6 tests on XP 2013-08-27 19:44:35 -05:00
Russell Belfer
f087bc245e Convert to our own SRWLOCK type on Win32 2013-08-27 12:08:55 -07:00
nulltoken
aec87f712f remote: Make git_remote_list() detect pushurl 2013-08-27 20:14:10 +02:00
nulltoken
191adce875 vector: Teach git_vector_uniq() to free while deduplicating 2013-08-27 20:14:07 +02:00
nulltoken
c9ffa84bde 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.
2013-08-27 19:31:19 +02:00
nulltoken
ece24ef7c4 remote: Don't parse missing urls as empty strings 2013-08-27 16:57:17 +02:00
nulltoken
44bc0c6ac3 remote: Warn the user when connecting with no url 2013-08-27 16:57:16 +02:00
nulltoken
b83c92dd6f remote: Assert proper GIT_DIRECTION_XXXX values 2013-08-27 16:57:15 +02:00
Russell Belfer
2f368a661c Fix MINGW SRWLock typedefs 2013-08-26 15:17:35 -07:00
Russell Belfer
430953417f 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.
2013-08-26 14:56:31 -07:00
Vicent Martí
ba7cc8d2f7 Merge pull request #1810 from nvloff/reference_is_tag
refs: add git_reference_is_tag
2013-08-26 03:32:09 -07:00
Nikolai Vladimirov
504850cdf5 refs: add git_reference_is_tag 2013-08-26 08:04:10 +03:00
Vicent Martí
a07db1a1e0 Merge pull request #1809 from frasertweedale/fix/git_push_unpack_ok-doc
push: small documentation fix
2013-08-25 03:39:06 -07:00
Fraser Tweedale
3261444056 push: small documentation fix 2013-08-25 17:01:04 +10:00
Fraser Tweedale
e52963080a 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.
2013-08-24 20:15:22 +10:00
Vicent Martí
6910ecb036 Merge pull request #1807 from frasertweedale/fix/freebsd
fix tests on FreeBSD
2013-08-24 02:43:38 -07:00
Fraser Tweedale
9d85f00722 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.
2013-08-24 17:39:15 +10:00
Russell Belfer
44d6553186 Fix comment 2013-08-23 12:03:44 -07:00
Russell Belfer
805755f49b 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.
2013-08-22 15:44:34 -07:00
Russell Belfer
b6ac07b517 Trying to fix Win32 warnings 2013-08-22 14:45:10 -07:00
Russell Belfer
eb868b1e98 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
2013-08-22 14:34:21 -07:00
Russell Belfer
972bb689c4 Add SRWLock implementation of rwlocks for Win32 2013-08-22 14:10:56 -07:00
Russell Belfer
2b6e190847 A bit of item alignment paranoia 2013-08-22 11:50:10 -07:00
Russell Belfer
8d9a85d43a 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.
2013-08-22 11:40:53 -07:00
Russell Belfer
3eecadcce5 Improve comments on locking for sortedcache APIs 2013-08-21 22:50:37 -07:00
Russell Belfer
e8c5eb5537 No need to lock newly created tgt in copy 2013-08-21 22:44:56 -07:00
Russell Belfer
6890e00c0e Merge pull request #1801 from ethomson/utf8_bom
Skip UTF-8 BOM in binary detection
2013-08-21 16:57:45 -07:00
Russell Belfer
b37359aac5 Fix warnings when compiling without threads 2013-08-21 16:50:03 -07:00
Russell Belfer
fe37274080 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.
2013-08-21 16:26:32 -07:00
Russell Belfer
24c71f14b4 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.
2013-08-21 14:10:27 -07:00
Russell Belfer
a4977169e1 Add sortedcache APIs to lookup index and remove
This adds two other APIs that I need to the sortedcache type.
2013-08-21 14:09:38 -07:00
Russell Belfer
0b7cdc0263 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.
2013-08-20 16:14:24 -07:00
Russell Belfer
0f0f565507 Don't try to pack symbolic refs
If there were symbolic refs among the loose refs then the code
to create packed-refs would fail trying to parse the OID out of
them (where Git just skips trying to pack them).  This fixes it.
2013-08-20 16:14:23 -07:00
Edward Thomson
c0b01b7572 Skip UTF-8 BOM in binary detection
When a git_buf contains a UTF-8 BOM, the three bytes comprising
that BOM are treated as unprintable characters.  For a small git_buf,
the three BOM characters overwhelm the printable characters.  This
is problematic when trying to check out a small file as the CR/LF
filtering will not apply.
2013-08-19 18:46:26 -05:00
Russell Belfer
5e1fb2828a Merge pull request #1800 from ethomson/mingw_warnings
Quiet down some warnings
2013-08-19 16:01:30 -07:00
Edward Thomson
8255b497b6 Quiet down some warnings 2013-08-19 17:49:53 -05:00
Ben Straub
adf9628262 Merge pull request #1796 from ethomson/fix_inet_pton
Fix p_inet_pton on windows
2013-08-19 15:47:31 -07:00
Edward Thomson
238b761491 Fix p_inet_pton on windows
p_inet_pton on Windows should set errno properly for callers.
Rewrite p_inet_pton to handle error cases correctly and add
test cases to exercise this function.
2013-08-19 17:21:35 -05:00
Ben Straub
25b2a55538 Merge pull request #1799 from ethomson/gettimeofday
Use time(2) to get the time
2013-08-19 15:06:39 -07:00