Commit Graph

9478 Commits

Author SHA1 Message Date
Arthur Schreiber
a3e379cb4e Remove traces of git_blob_create_fromchunks 2016-04-26 11:10:31 +02:00
Carlos Martín Nieto
9068704bd8 Merge pull request #3749 from arthurschreiber/arthur/add-git-reference-dup
Allow creating copies of `git_reference` objects.
2016-04-26 11:02:45 +02:00
Carlos Martín Nieto
c30955e0c0 Merge pull request #3748 from libgit2/ethomson/rebase_detached
Rebase improvements with IDs
2016-04-26 11:02:05 +02:00
Edward Thomson
b058297afa Merge pull request #3752 from libgit2/cmn/silly-tags
tag: ignore extra header fields
2016-04-25 09:45:27 -04:00
Carlos Martín Nieto
eb39284bab tag: ignore extra header fields
While no extra header fields are defined for tags, git accepts them by
ignoring them and continuing the search for the message. There are a few
tags like this in the wild which git parses just fine, so we should do
the same.
2016-04-25 12:18:32 +02:00
Arthur Schreiber
908f24fd13 Allow creating copies of git_reference objects. 2016-04-22 10:34:17 -07:00
Carlos Martín Nieto
512bd2c78f Merge pull request #3747 from libgit2/ethomson/warnings
 some warnings
2016-04-22 15:40:08 +02:00
Edward Thomson
1f84caf0c0 rebase: correctly finish rebasing detached heads
When rebasing with IDs, we do not return to the `branch`,
we remain in a detached HEAD state.
2016-04-21 18:19:05 -04:00
Edward Thomson
badc72838f rebase: handle detached HEADs in init
When `init`ing a rebase from a detached HEAD, be sure to remember
that we were in a detached HEAD state so that we can correctly
`abort` the object that we just created.
2016-04-21 18:19:05 -04:00
Edward Thomson
320f53cd6c rebase: test abort immediately after init
Instead of `open`ing a rebase and `abort`ing that, test that we can
`abort` a rebase that has just begun with `init`.
2016-04-21 18:19:05 -04:00
Edward Thomson
0bd7740173 clone test: annotate unused vars 2016-04-21 11:05:21 -04:00
Edward Thomson
375bb2fe60 transport: cast away constness for free 2016-04-21 11:02:31 -04:00
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
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
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
bbd65ad27e 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 15:32:38 -04:00
Edward Thomson
0e00eecf83 Merge pull request #3736 from libgit2/cmn/dwim-general-message
refs: provide a more general error message for dwim
2016-04-11 13:29:54 -04:00
Carlos Martín Nieto
b93b74b9e3 Merge pull request #3737 from ethomson/strict-object
Strict object creation in `refs::create`
2016-04-11 19:24:47 +02:00
Edward Thomson
d22a8b9583 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 11:50:11 -04:00
Carlos Martín Nieto
6d22ef7a51 reset: use real ids for the tests
This lets us run with strict object creation on.
2016-04-11 11:47:56 -04:00
Carlos Martín Nieto
77965c685d 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 17:47:03 +02:00
Edward Thomson
69723dd8d3 Merge pull request #3730 from andhe/fix-stream-test
tests: fix core/stream test when built with openssl off
2016-04-06 15:59:31 -04:00
Andreas Henriksson
04f47a43f9 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-06 15:00:32 +02:00
Edward Thomson
54cfee6d88 Merge pull request #3728 from libgit2/cmn/no-embed
Remove Makefile.embed
2016-04-05 14:47:02 -04:00
Carlos Martín Nieto
21ba34618b Remove Makefile.embed
This has not been a supported build mode for quite some time, and it
correspondingly hasn't worked to build the library for a long time. Get
rid of it, as the only build mode we support is though CMakek.
2016-04-05 13:25:23 -04:00
Carlos Martín Nieto
381caf5690 Merge pull request #3724 from ethomson/submodule_start_supports_silly_slashes
iterator/diff: allow trailing `/` on start/end paths to match submodules
2016-04-02 22:19:42 -07:00
Edward Thomson
7018e3b747 Merge pull request #3723 from libgit2/cmn/ignore-symlink
ignore: don't use realpath to canonicalize path
2016-04-02 16:52:53 -04:00
Edward Thomson
d47f7e1c15 iterator: support trailing / in start for submod
Allow callers to specify a start path with a trailing slash to match
a submodule, instead of just a directory.  This is for some legacy
behavior that's sort of dumb, but there it is.
2016-04-02 13:34:55 -07:00
Edward Thomson
2e0391f4f1 diff: test submodules are found with trailing /
Test that submodules are found when the are included in a pathspec
but have a trailing slash.
2016-04-02 13:02:41 -07:00