|
ea59f659
|
2013-09-26T16:20:30
|
|
Deploy gitno_connection_data into transport (winhttp)
...and have that call manage replaced memory in the output structure.
|
|
8988688c
|
2013-09-25T20:41:56
|
|
Migrate redirect URL handling to common utility
|
|
1c8de380
|
2013-09-20T16:58:04
|
|
Make tests pass if XDG config exists
|
|
eb0ff130
|
2013-09-24T14:07:08
|
|
Disconnect path string to preserve after redirect
The subtransport path was relying on pointing to data owned by
the remote which meant that after a redirect, the updated path
was getting lost for future requests. This updates the http
transport to strdup the path and maintain its own lifetime.
This also pulls responsibility for parsing the URL back into the
http transport and isolates the functions that parse and free that
connection data so that they can be reused between the initial
parsing and the redirect parsing.
|
|
d005885f
|
2013-09-24T10:20:16
|
|
Fix up filebuf tests a bit
|
|
634f10f6
|
2013-09-24T10:11:20
|
|
Fix incorrect return code in crlf filter
The git_buf_text_gather_stats call returns a boolean indicating if
the file looks like binary data. That shouldn't be an error; it
should be used to skip CRLF processing though.
|
|
71379313
|
2013-09-23T13:40:23
|
|
Fix warnings on Windows 64-bit build
|
|
07fb67f9
|
2013-09-22T05:55:39
|
|
merge: reverse array and length parameter order
Make it pair up with the one for commits. This fixes #1691.
|
|
32b247d5
|
2013-09-19T10:30:43
|
|
Suppress noise from running Valgrind on OSX 10.8
|
|
f60ed4e6
|
2013-09-16T15:08:35
|
|
Update clar and recreate cl_assert_equal_sz
This updates clar to the version without cl_assert_equal_sz and
then adds a new version of that macro the clar_libgit2.h. The new
version works around a strange issue that seemed to be arising on
release builds with VS 10 64-bit builds.
|
|
eefc32d5
|
2013-09-16T12:54:40
|
|
Bug fixes and cleanups
This contains a few bug fixes and some header and API cleanups.
The main API change is that filters should now use GIT_PASSTHROUGH
to indicate that they wish to skip processing a file instead of
GIT_ENOTFOUND.
The bug fixes include a possible out-of-range buffer access in
the ident filter, a filter ordering problem I introduced into the
custom filter tests on Windows, and a filter buf NUL termination
issue that was coming up on Linux.
|
|
eab3746b
|
2013-09-15T22:23:39
|
|
More filtering tests including order
This adds more tests of filters, including the ident filter when
mixed with custom filters. I was able to combine with the reverse
filter and demonstrate that the order of filter application with
the default priority constants matches the order of core Git.
Also, this fixes two issues in the ident filter: preventing ident
expansion on binary files and avoiding a NULL dereference when
dollar sign characters are found without Id.
|
|
37f9e409
|
2013-09-13T21:43:00
|
|
Some tests with ident and crlf filters
Fixed the filter order to match core Git, too.
This test demonstrates an interesting behavior of core Git (which
is totally reasonable and which libgit2 matches, although mostly
by coincidence). If you use the ident filter and commit a file
with a garbage ident in it, like '$Id: this is just garbage$' and
then immediately do a 'git checkout-index' with the new file, Git
will not consider the file out of date and will not overwrite the
file with an updated $Id$. Libgit2 has the same behavior. If you
remove the file and then do a checkout-index, it will be replaced
with a filtered version that has injected the OID correctly.
|
|
155fa234
|
2013-09-05T15:06:42
|
|
Add clar helper to create new commit from index
There were a lot of places in the test code base that were creating
a commit from the index on the current branch. This just adds a
helper to handle that case pretty easily. There was only one test
where this change ended up tweaking the test data, so pretty easy
and mostly just a cleanup.
|
|
13f36ffb
|
2013-09-13T16:30:21
|
|
Add clar helpers for testing file equality
These are a couple of new clar helpers for testing that a file
has expected contents that I extracted from the checkout code.
Actually wrote this as part of an abandoned earlier attempt at a
new filters API, but it will be useful now for some of the tests
I'm going to write.
|
|
fa9cc148
|
2013-09-13T13:41:33
|
|
Fix cleanup issues with new tests
|
|
8427757f
|
2013-09-13T12:32:45
|
|
Fixing up some win32 issues with autocrlf
|
|
a9f51e43
|
2013-09-11T22:00:36
|
|
Merge git_buf and git_buffer
This makes the git_buf struct that was used internally into an
externally available structure and eliminates the git_buffer.
As part of that, some of the special cases that arose with the
externally used git_buffer were blended into the git_buf, such as
being careful about git_buf objects that may have a NULL ptr and
allowing for bufs with a valid ptr and size but zero asize as a
way of referring to externally owned data.
|
|
4b11f25a
|
2013-09-11T16:38:33
|
|
Add ident filter
This adds the ident filter (that knows how to replace $Id$) and
tweaks the filter APIs and code so that git_filter_source objects
actually have the updated OID of the object being filtered when
it is a known value.
|
|
40cb40fa
|
2013-09-11T14:23:39
|
|
Add functions to manipulate filter lists
Extend the git2/sys/filter API with functions to look up a filter
and add it manually to a filter list. This requires some trickery
because the regular attribute lookups and checks are bypassed when
this happens, but in the right hands, it will allow a user to have
granular control over applying filters.
|
|
ad7417d7
|
2013-09-13T09:44:30
|
|
Make filter tests somewhat more robust
The global and system config could interfere with the filter
tests by imposing CRLF filtering where it was not anticipated.
This better isolates the tests from the system settings.
|
|
d5b1866c
|
2013-09-13T09:26:26
|
|
Rearrange clar submodule cleanup code
|
|
b47349b8
|
2013-09-12T14:48:24
|
|
Port tests from PR 1683
This ports over some of the tests from
https://github.com/libgit2/libgit2/pull/1683
by @yorah and @ethomson
|
|
2a7d224f
|
2013-09-10T16:33:32
|
|
Extend public filter api with filter lists
This moves the git_filter_list into the public API so that users
can create, apply, and dispose of filter lists. This allows more
granular application of filters to user data outside of libgit2
internals.
This also converts all the internal usage of filters to the public
APIs along with a few small tweaks to make it easier to use the
public git_buffer stuff alongside the internal git_buf.
|
|
974774c7
|
2013-09-09T16:57:34
|
|
Add attributes to filters and fix registry
The filter registry as implemented was too primitive to actually
work once multiple filters were coming into play. This expands
the implementation of the registry to handle multiple prioritized
filters correctly.
Additionally, this adds an "attributes" field to a filter that
makes it really really easy to implement filters that are based
on one or more attribute values. The lookup and even simple value
checking can all happen automatically without custom filter code.
Lastly, with the registry improvements, this fills out the filter
lifecycle callbacks, with initialize and shutdown callbacks that
will be called before the filter is first used and after it is
last invoked. This allows for system-wide initialization and
cleanup by the filter.
|
|
85d54812
|
2013-08-28T16:44:04
|
|
Create public filter object and use it
This creates include/sys/filter.h with a basic definition of a
git_filter and then converts the internal code to use it. There
are related internal objects (git_filter_list) that we will want
to publish at some point, but this is a first step.
|
|
0cf77103
|
2013-08-26T23:17:07
|
|
Start of filter API + git_blob_filtered_content
This begins the process of exposing git_filter objects to the
public API. This includes:
* new public type and API for `git_buffer` through which an
allocated buffer can be passed to the user
* new API `git_blob_filtered_content`
* make the git_filter type and GIT_FILTER_TO_... constants public
|
|
4581f9d8
|
2013-09-17T08:09:57
|
|
Merge pull request #1833 from libgit2/cmn/config-include
Support config includes
|
|
605da51a
|
2013-09-17T09:50:30
|
|
No such thing as an orphan branch
Unfortunately git-core uses the term "unborn branch" and "orphan
branch" interchangeably. However, "orphan" is only really there for
the checkout command, which has the `--orphan` option so it doesn't
actually create the branch.
Branches never have parents, so the distinction of a branch with no
parents is odd to begin with. Crucially, the error messages deal with
unborn branches, so let's use that.
|
|
e580afd8
|
2013-09-13T14:33:26
|
|
Add tests for git_tree_walk
This tests the fixes for issues from #1849
|
|
6f200361
|
2013-09-12T13:50:35
|
|
clar: Move cl_assert_equal_sz() definition to clar.h
|
|
273ddc54
|
2013-09-12T13:50:00
|
|
clar: Fix clar__assert_equal error message formating
|
|
6c38e60a
|
2013-09-10T16:55:58
|
|
Merge pull request #1838 from libgit2/cmn/first-parent
revwalk: allow simplifying by first-parent
|
|
209f9b67
|
2013-09-08T18:25:17
|
|
odb: Teach loose backend to return EAMBIGUOUS
|
|
15f7b9b8
|
2013-09-08T00:52:26
|
|
revwalk: allow simplifying by first-parent
When enabled, only the first parent of each commit will be queued,
enabling a simple way of using first-parent simplification.
|
|
031f3f80
|
2013-09-07T22:39:05
|
|
odb: Error when streaming in too [few|many] bytes
|
|
a9fb7989
|
2013-09-06T20:51:35
|
|
config: refresh included files
We need to refresh the variables from the included files if they are
changed, so loop over all included files and re-parse the files if any
of them has changed.
|
|
d8d25acb
|
2013-09-05T19:24:20
|
|
config: add support for include directives
Relative, absolute and home-relative paths are supported. The
recursion limit it set at 10, just like in git.
|
|
53ea0513
|
2013-09-07T19:07:39
|
|
config: handle realloc issues from larger depths
As the include depth increases, the chance of a realloc
increases. This means that whenever we run git_array_alloc() or call
config_parse(), we need to remember what our reader's index is so we
can look it up again.
|
|
73fc5e01
|
2013-09-06T21:12:26
|
|
config: fix variable overriding
When two or more variables of the same name exist and the user asks
for a scalar, we must return the latest value assign to it.
|
|
ef6389ad
|
2013-09-07T09:18:56
|
|
Merge pull request #1836 from libgit2/ntk/fix/leaks
Fix memory leaks
|
|
e839efbe
|
2013-09-07T17:51:24
|
|
tests: Fix memory leaks
|
|
a8d67afe
|
2013-09-07T17:21:41
|
|
revparse: Prevent unnecessary odb backend calls
|
|
4047950f
|
2013-08-29T14:19:34
|
|
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.
|
|
ae4a4866
|
2013-08-29T14:12:13
|
|
blob: Slightly enforce a create_fromchunks() test
|
|
a7fcc44d
|
2013-09-05T16:14:32
|
|
Better macro name for is-exec-bit-set test
|
|
af22dabb
|
2013-09-05T12:01:17
|
|
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.
|
|
c97d407d
|
2013-09-05T11:45:29
|
|
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.
|
|
27061b15
|
2013-09-05T10:25:16
|
|
Fix some newer GCC compiler warnings
|
|
9ce4f7da
|
2013-09-04T16:41:34
|
|
Fix tests to use core.filemode correctly
Some windows tests were failing
|
|
2a54c7f4
|
2013-09-04T16:24:36
|
|
_umask is function name on Windows
|
|
abfed59c
|
2013-09-04T16:21:18
|
|
Clean up one other mode_t assertion
|
|
780f3e54
|
2013-09-04T16:13:18
|
|
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.
|
|
cf94024c
|
2013-09-04T11:42:48
|
|
Update clar
|
|
61d57b7a
|
2013-09-04T14:27:59
|
|
Test pushing to remotes with "file:///" urls
|
|
e9853592
|
2013-09-04T06:20:36
|
|
Merge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilities
Of backends and refreshers...
|
|
cae52938
|
2013-09-03T14:00:27
|
|
Fix resolving relative windows network paths
|
|
0d1af399
|
2013-09-03T12:33:34
|
|
don't use inline in tests for win32
|
|
6208bd49
|
2013-09-03T12:29:18
|
|
Merge pull request #1804 from ethomson/rewrites
Minor changes for rewrites
|
|
6d9a6c5c
|
2013-09-03T07:58:21
|
|
path: properly resolve relative paths
|
|
3b75b684
|
2013-09-01T18:53:07
|
|
Define S_IREAD i S_IWRITE for Android.
|
|
a12e069a
|
2013-08-30T16:31:52
|
|
odb: Honor the non refreshing capability of a backend
|
|
0001c023
|
2013-08-29T13:22:44
|
|
Fix typo _delete -> _free
|
|
dbecec37
|
2013-08-28T09:38:14
|
|
Merge pull request #1805 from libgit2/threading-packed-load
Thread safety for the refdb_fs
|
|
17c7fbf6
|
2013-08-21T14:07:53
|
|
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".
|
|
1ef05e3f
|
2013-08-28T06:05:50
|
|
Merge pull request #1803 from libgit2/ntk/topic/even_more_lenient_remote_parsing
Even more lenient remote parsing
|
|
b8b22d77
|
2013-08-28T06:04:51
|
|
Merge pull request #1772 from libgit2/config-iter
Configuration iterators redux
|
|
1ff3a094
|
2013-08-27T19:41:44
|
|
Improve win32 version check, no ipv6 tests on XP
|
|
aec87f71
|
2013-08-27T19:14:18
|
|
remote: Make git_remote_list() detect pushurl
|
|
191adce8
|
2013-08-27T20:00:28
|
|
vector: Teach git_vector_uniq() to free while deduplicating
|
|
c9ffa84b
|
2013-08-21T16:04:25
|
|
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.
|
|
ece24ef7
|
2013-08-21T13:37:21
|
|
remote: Don't parse missing urls as empty strings
|
|
504850cd
|
2013-08-25T15:59:50
|
|
refs: add git_reference_is_tag
|
|
9d85f007
|
2013-08-24T17:39:15
|
|
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.
|
|
44d65531
|
2013-08-19T16:03:15
|
|
Fix comment
|
|
b6ac07b5
|
2013-08-22T14:45:10
|
|
Trying to fix Win32 warnings
|
|
972bb689
|
2013-08-22T14:10:56
|
|
Add SRWLock implementation of rwlocks for Win32
|
|
8d9a85d4
|
2013-08-22T11:40:53
|
|
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.
|
|
b37359aa
|
2013-08-21T16:50:03
|
|
Fix warnings when compiling without threads
|
|
fe372740
|
2013-08-21T16:26:32
|
|
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.
|
|
a4977169
|
2013-08-21T14:09:38
|
|
Add sortedcache APIs to lookup index and remove
This adds two other APIs that I need to the sortedcache type.
|
|
0b7cdc02
|
2013-08-20T15:18:48
|
|
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.
|
|
0f0f5655
|
2013-08-19T10:42:48
|
|
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.
|
|
c0b01b75
|
2013-08-19T18:46:26
|
|
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.
|
|
238b7614
|
2013-08-16T13:31:24
|
|
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.
|
|
520287f6
|
2013-08-19T02:17:00
|
|
Merge pull request #1785 from libgit2/cmn/odb-hash-frontend
odb: move hashing to the frontend for streaming
|
|
3d276874
|
2013-08-19T10:30:44
|
|
index: report when it's locked
Report the index being locked with its own error code in order to be
able to differentiate, as a locked index is typically the result of a
crashed process or concurrent access, both of which often require user
intervention to fix.
|
|
51a5e133
|
2013-08-16T16:22:37
|
|
Merge pull request #1778 from libgit2/push_tag_to_tag_test
push: handle tag chains correctly
|
|
0ea41445
|
2013-08-16T15:03:15
|
|
Improve isolation of new test from user environs
|
|
579d87c5
|
2013-08-16T14:48:14
|
|
New test that inits repo and make commit
|
|
376e6c9f
|
2013-08-15T13:48:35
|
|
odb: wrap the stream reading and writing functions
This is in preparation for moving the hashing to the frontend, which
requires us to handle the incoming data before passing it to the
backend's stream.
|
|
9d1751bf
|
2013-08-14T06:44:28
|
|
Merge pull request #1783 from libgit2/cmn/relax-remote
remote: relax the url rules
|
|
0b9ebb54
|
2013-08-14T11:18:05
|
|
remote: relax the url rules
Accept any value for the remote's url, including an empty string which
we used to reject as invalid configuration.
This is not quite what git does (although it has its own problems with
such configurations) and it makes it harder to fix the issue, by not
letting the user modify it.
As we already need to check for a valid URL when we try to connect to
the network, let that perform the check, as we don't need to do it
anywhere else.
|
|
5be622fb
|
2013-08-11T01:37:44
|
|
Test SSH in travis
Set up the ssh credentials so we are able to talk to localhost and
issue git commands. Move to use a script, as the command list is
getting somewhat long.
While here, delay installing valgrind until we need it, as it and its
dependencies are by far the largest downloads and this allows us to
start compiling (and failing) faster and we only incur this cost when
the test suite runs successfully.
|
|
f4be8209
|
2013-08-14T00:45:05
|
|
config: don't special-case the multivar iterator
Build it on top of the normal iterator instead, which lets use re-use
a lot of code.
|
|
40948998
|
2013-08-13T11:36:24
|
|
Merge pull request #1767 from libgit2/win32-bigger-utf8-buffer
Bigger buffer for utf-8 parsing in win32
|
|
ee065601
|
2013-08-13T09:53:56
|
|
Minor win32 fixes and improvements
This is just a bunch of small fixes that I noticed while looking
at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking
for an empty directory (not exiting loop asap), makes the dir name
in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation,
and fixes some slightly odd assumptions in the cl_getenv helper.
|
|
d4cff0cb
|
2013-08-13T09:40:32
|
|
Rename git__win32_path fns to git_win32_path
|
|
abf37327
|
2013-08-13T09:15:39
|
|
windows: Path conversion with better semantics
|
|
423e3b0c
|
2013-08-12T11:02:53
|
|
Update to clar 7bf638b80
|