Commit Graph

10765 Commits

Author SHA1 Message Date
Edward Thomson
e0aed4bda3 stransport: pass proxy opts instead of char* 2016-04-21 11:01:09 -04:00
Edward Thomson
db22a91b86 iterator: ignore submodule in has_ended 2016-04-21 10:58:22 -04:00
Edward Thomson
1dc449105b Merge pull request #3110 from libgit2/cmn/proxy-config
Proxy configuration
2016-04-19 19:48:52 -04:00
Carlos Martín Nieto
2638df7711 CI: download the proxy jar also on mingw
We were downloading the jar from within an block which only runs for
MSVC. Move the download to the start of the test so it gets downloaded
for both.
2016-04-19 23:05:16 +02:00
Edward Thomson
95fbc81daf Merge pull request #3745 from libgit2/cmn/ignore-starstar
Improve star-star matching
2016-04-19 15:24:14 -04:00
Carlos Martín Nieto
d45928cc0d ignore: move star-star matching closer to it use
Instead of threading the state down to the larger loop, let's have the
loop where we detect the double star so each of them are easier to read.
2016-04-19 19:39:06 +02:00
Carlos Martín Nieto
1c3018eb12 ignore: fix directory limits when searching for star-star
In order to match the star-star, we disable the flag that's looking for
a single path element, but that leads to searching for the pattern in
the middle of elements in the input string.

Mark when we're handing a star-star so we jump over the elements in our
attempt to match the part of the pattern that comes after the star-star.

While here, tighten up the check so we don't allow invalid rules
through.
2016-04-19 19:39:05 +02:00
Carlos Martín Nieto
b8353236bc CI: run proxy tests with ctest
Running clar directly on appveyor makes it think the command returned
failure, so it stops the tests. Running it via ctest lets it go through.
2016-04-19 13:54:27 +02:00
Carlos Martín Nieto
0d72f67f28 proxy: don't specify the protocol in the type
We leave this up to the scheme in the url field. The type should only
tell us about whether we want a proxy and whether we want to auto-detect
it.
2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
db01724fd9 CI: start the proxy before the build so it's ready
It takes a bit for the propxy to get ready to accept connections, so
start it before the build so we can be reasonably sure that it's going
to be ready in time.
2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
bf6f7ad297 winhttp: correctly detect HTTPS usage 2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
467e2cb1d7 curl: ask for proxy credentials 2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
60d717c6f1 proxy: add a payload field for the proxy options
I don't quite recall what we do in the other places where we use this,
but we should pass this payload to the callbacks.
2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
b373e9a6ba net: use proxy options struct in the stream config 2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
22e6aa0d4f proxy: don't require the trailing slash on WinHTTP
The path is not something that you use for proxies, so make use of the
new optionality of the path when extracting URL parts.
2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
2f3f1ee085 proxy: test proxy support on Travis 2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
4e01741390 netops: make the path optional in URLs
When we're dealing with proxy addresses, we only want a hostname and
port, and the user would not provide a path, so make it optional so we
can use this same function to parse git as well as proxy URLs.
2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
b117721dd8 proxy: use poxy to test our Windows proxy support 2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
07bd3e57d9 proxy: ask the user for credentials if necessary 2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
a7bece2014 proxy: introduce a proxy options struct
It is currently unused; it will go into the remote's options.
2016-04-19 13:54:19 +02:00
Antonio Scandurra
0f36271646 Add more tests for path matching with globs and path delimiters 2016-04-18 15:21:43 +02:00
Carlos Martín Nieto
029c93464f Merge pull request #3740 from Qix-/patch-1
Add missing ')' to callbacks documentation
2016-04-13 11:51:05 +02:00
Andreas Henriksson
301b9067fe Upload to unstable 2016-04-13 11:31:55 +02:00
Josh Junon
fc15befdcd Add missing ')' to callbacks documentation
Super minor, but it was bugging me.

There was a missing closing paren in the docs.
2016-04-12 21:50:18 -07:00
Andreas Henriksson
25dcab5fc4 Update debian/changelog 2016-04-12 16:37:11 +02:00
Andreas Henriksson
903d97a725 Revert "Disable fakeroot emulation when running tests"
This reverts commit 267c427582.

No longer needed, upstream testsuite fixed to assume failure
when running as root is ok. See:
https://github.com/libgit2/libgit2/commit/5cc7a5c7b389066ab7
2016-04-12 16:33:06 +02:00
Andreas Henriksson
62a960f111 Drop git_tests-fix-core-stream-test-when-built-with-openssl-o.patch
- merged upstream.

Git-Dch: full
2016-04-12 16:32:16 +02:00
Andreas Henriksson
a2315f05bb Update debian/changelog 2016-04-12 16:31:59 +02:00
Andreas Henriksson
6f92394e3b Merge tag 'upstream/0.24.1'
Upstream version 0.24.1
2016-04-12 16:31:06 +02:00
Andreas Henriksson
c7f45bda7d Imported Upstream version 0.24.1 2016-04-12 16:31:05 +02:00
Carlos Martín Nieto
211e117a05 Merge pull request #3739 from ethomson/0.24.1
Backport bug fixes to 0.24
2016-04-12 00:18:17 +02:00
Carlos Martín Nieto
a2d3d2d3ac Merge pull request #3738 from ethomson/test_as_root
tests: skip the unreadable file tests as root
2016-04-12 00:14:00 +02:00
Edward Thomson
8edadbf978 index::racy: force racy entry
Instead of hoping that we can get a racy entry by going real fast
and praying real hard, just create a racy entry.
2016-04-11 16:40:30 -04:00
Edward Thomson
ccfacb8bb1 leaks: call xdl_free_classifier 2016-04-11 16:17:04 -04:00
Edward Thomson
6a35e74cb3 leaks: fix some leaks in the tests 2016-04-11 16:16:55 -04:00
Carlos Martín Nieto
2c1bc36d56 Plug a few leaks 2016-04-11 16:15:33 -04:00
Edward Thomson
5cc7a5c7b3 tests: skip the unreadable file tests as root
When running as root, skip the unreadable file tests, because, well,
they're probably _not_ unreadable to root unless you've got some
crazy NSA clearance-level honoring operating system shit going on.
2016-04-11 16:05:51 -04:00
Edward Thomson
1d59c85aad status: update test to include valid OID 2016-04-11 15:59:12 -04:00
Edward Thomson
af753aba14 tree: drop the now-unnecessary entries vector
Remove the now-unnecessary entries vector.  Add `git_array_search`
to binary search through an array to accomplish this.
2016-04-11 15:58:59 -04:00
Carlos Martín Nieto
13ebf7bdbc tree: store the entries in a growable array
Take advantage of the constant size of tree-owned arrays and store them
in an array instead of a pool. This still lets us free them all at once
but lets the system allocator do the work of fitting them in.
2016-04-11 15:58:58 -04:00
Carlos Martín Nieto
26f2cefb81 tree: re-use the id and filename in the odb object
Instead of copying over the data into the individual entries, point to
the originals, which are already in a format we can use.
2016-04-11 15:58:58 -04:00
Carlos Martín Nieto
177890838a ignore: don't use realpath to canonicalize path
If we're looking for a symlink, realpath will give us the resolved path,
which is not what we're after, but a canonicalized version of the path
the user asked for.
2016-04-11 15:58:58 -04:00
Edward Thomson
21d8832e74 config::write::repeated: init our buffer 2016-04-11 15:58:58 -04:00
Edward Thomson
a13c1ec206 config: don't write section header if we're in it
If we hit the EOF while trying to write a new value, it may be that
we're already in the section that we were looking for.  If so, do not
write a (duplicate) section header, just write the value.
2016-04-11 15:58:58 -04:00
Carlos Martín Nieto
e8d5df9edc config: show we write a spurious duplicated section header
We should notice that we are in the correct section to add. This is a
cosmetic bug, since replacing any of these settings does work.
2016-04-11 15:58:58 -04:00
Edward Thomson
b6130fe15e refs::create: strict object creation on by default
When we turned strict object creation validation on by default, we
forgot to inform the refs::create tests of this.  They, in fact,
believed that strict object creation was off by default.  As a result,
their cleanup function went and turned strict object creation off for
the remaining tests.
2016-04-11 15:58:58 -04:00
Carlos Martín Nieto
ba52879b46 reset: use real ids for the tests
This lets us run with strict object creation on.
2016-04-11 15:58:58 -04:00
Carlos Martín Nieto
3e2e8240c0 refs: provide a more general error message for dwim
If we cannot dwim the input, set the error message to be explicit about
that. Otherwise we leave the error for the last failed lookup, which
can be rather unexpected as it mentions a remote when the user thought
they were trying to look up a branch.
2016-04-11 15:58:57 -04:00
Andreas Henriksson
ab062a3938 tests: fix core/stream test when built with openssl off
When passing -DUSE_OPENSSL:BOOL=OFF to cmake the testsuite will
fail with the following error:

core::stream::register_tls [/tmp/libgit2/tests/core/stream.c:40]
  Function call failed: (error)
  error -1 - <no message>

Fix test to assume failure for tls when built without openssl.
While at it also fix GIT_WIN32 cpp to check if it's defined
or not.
2016-04-11 15:58:57 -04:00
Carlos Martín Nieto
fe1f47776f Add a no-op size_t typedef for the doc parser
Clang's documentation parser, which we use in our documentation system
does not report any comments for functions which use size_t as a type.

The root cause is buried somewhere in libclang but we can work around it
by defining the type ourselves. This typedef makes sure that libclang
sees it and that we do not change its size.
2016-04-11 15:58:57 -04:00