]> git.proxmox.com Git - libgit2.git/log
libgit2.git
8 years agozstream: fail when asked to inflate garbage
Edward Thomson [Thu, 9 Jul 2015 23:36:53 +0000 (18:36 -0500)]
zstream: fail when asked to inflate garbage

When we are provided some input buffer (with a length) to inflate,
and it contains more data than simply the deflated data, fail.
zlib will helpfully tell us when it is done reading (via Z_STREAM_END),
so if there is data leftover in the input buffer, fail lest we
continually try to inflate it.

8 years agogit_buf: decode base85 inputs
Edward Thomson [Thu, 9 Jul 2015 18:04:10 +0000 (13:04 -0500)]
git_buf: decode base85 inputs

8 years agopatch application: apply binary patches
Edward Thomson [Thu, 18 Jun 2015 01:13:10 +0000 (18:13 -0700)]
patch application: apply binary patches

Handle the application of binary patches.  Include tests that
produce a binary patch (an in-memory `git_patch` object),
then enusre that the patch applies correctly.

8 years agozstream: offer inflating, `git_zstream_inflatebuf`
Edward Thomson [Wed, 17 Jun 2015 15:07:34 +0000 (08:07 -0700)]
zstream: offer inflating, `git_zstream_inflatebuf`

Introduce `git_zstream_inflatebuf` for simple uses.

8 years agodelta: refactor git_delta functions for consistency
Edward Thomson [Wed, 17 Jun 2015 14:31:47 +0000 (07:31 -0700)]
delta: refactor git_delta functions for consistency

Refactor the git_delta functions to have consistent naming and
parameters with the rest of the library.

8 years agodelta: move delta application to delta.c
Edward Thomson [Wed, 17 Jun 2015 13:42:20 +0000 (06:42 -0700)]
delta: move delta application to delta.c

Move the delta application functions into `delta.c`, next to the
similar delta creation functions.  Make the `git__delta_apply`
functions adhere to other naming and parameter style within the
library.

8 years agoapply: handle empty patches
Edward Thomson [Wed, 17 Jun 2015 13:03:01 +0000 (06:03 -0700)]
apply: handle empty patches

When a patch is empty, simply copy the source into the destination.

8 years agoPatch parsing from patch files
Edward Thomson [Wed, 9 Apr 2014 00:18:47 +0000 (17:18 -0700)]
Patch parsing from patch files

8 years agoIntroduce git_apply_patch
Edward Thomson [Wed, 2 Apr 2014 06:58:59 +0000 (23:58 -0700)]
Introduce git_apply_patch

The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.

8 years agoMerge pull request #3799 from sschuberth/master
Edward Thomson [Thu, 26 May 2016 15:28:00 +0000 (10:28 -0500)]
Merge pull request #3799 from sschuberth/master

Use AppVeyor's Start-FileDownload cmdlet

8 years agoMerge pull request #3798 from mmuman/stat-test-fix
Edward Thomson [Thu, 26 May 2016 15:25:40 +0000 (10:25 -0500)]
Merge pull request #3798 from mmuman/stat-test-fix

test: Fix stat() test to mask out unwanted bits

8 years agoMerge branch 'checkout_submodules'
Edward Thomson [Thu, 26 May 2016 06:20:41 +0000 (01:20 -0500)]
Merge branch 'checkout_submodules'

8 years agoIgnore submodules when checking for merge conflicts in the workdir.
Jason Haslam [Thu, 12 May 2016 19:18:07 +0000 (13:18 -0600)]
Ignore submodules when checking for merge conflicts in the workdir.

8 years agocheckout: handle dirty submodules correctly
Jason Haslam [Wed, 17 Feb 2016 04:02:41 +0000 (21:02 -0700)]
checkout: handle dirty submodules correctly

Don't generate conflicts when checking out a modified submodule and the
submodule is dirty or modified in the workdir.

8 years agoMerge pull request #3792 from edquist/misc
Edward Thomson [Thu, 26 May 2016 05:58:43 +0000 (00:58 -0500)]
Merge pull request #3792 from edquist/misc

Fix comment for GIT_FILEMODE_LINK

8 years agoUse AppVeyor's Start-FileDownload cmdlet
Sebastian Schuberth [Wed, 25 May 2016 10:10:44 +0000 (12:10 +0200)]
Use AppVeyor's Start-FileDownload cmdlet

Start-FileDownload maintains current directory context and allows
specifying a request timeout, see [1].

[1] https://www.appveyor.com/docs/how-to/download-file#start-filedownload-cmdlet

8 years agotest: Fix stat() test to mask out unwanted bits
François Revol [Tue, 24 May 2016 17:07:09 +0000 (19:07 +0200)]
test: Fix stat() test to mask out unwanted bits

Haiku and Hurd both pass extra bits in struct stat::st_mode.

8 years agoMerge pull request #3797 from libgit2/cmn/remove-single-entry
Carlos Martín Nieto [Tue, 24 May 2016 14:15:57 +0000 (16:15 +0200)]
Merge pull request #3797 from libgit2/cmn/remove-single-entry

tree: handle removal of all entries in the updater

8 years agotree: handle removal of all entries in the updater
Carlos Martín Nieto [Tue, 24 May 2016 12:30:43 +0000 (14:30 +0200)]
tree: handle removal of all entries in the updater

When we remove all entries in a tree, we should remove that tree from
its parent rather than include the empty tree.

8 years agoMerge pull request #3794 from libgit2/cmn/tree-update-basename
Carlos Martín Nieto [Mon, 23 May 2016 16:02:24 +0000 (18:02 +0200)]
Merge pull request #3794 from libgit2/cmn/tree-update-basename

Tree updater fixups

8 years agotree: plug leaks in the tree updater
Carlos Martín Nieto [Thu, 19 May 2016 13:29:53 +0000 (15:29 +0200)]
tree: plug leaks in the tree updater

8 years agotree: use the basename for the entry removal
Carlos Martín Nieto [Thu, 19 May 2016 13:22:02 +0000 (15:22 +0200)]
tree: use the basename for the entry removal

When we want to remove the file, use the basename as the name of the
entry to remove, instead of the full one, which includes the directories
we've inserted into the stack.

8 years agotree: use testrepo2 for the tree updater tests
Carlos Martín Nieto [Thu, 19 May 2016 13:21:26 +0000 (15:21 +0200)]
tree: use testrepo2 for the tree updater tests

This gives us trees with subdirectories, which the new test needs.

8 years agoFix comment for GIT_FILEMODE_LINK
Carl Edquist [Wed, 18 May 2016 21:00:01 +0000 (16:00 -0500)]
Fix comment for GIT_FILEMODE_LINK

0120000 is symbolic link, not commit

8 years agoMerge pull request #3770 from libgit2/cmn/tree-update
Edward Thomson [Wed, 18 May 2016 16:30:02 +0000 (11:30 -0500)]
Merge pull request #3770 from libgit2/cmn/tree-update

Add a method specifically for modifying trees

8 years agoIntroduce a function to create a tree based on a different one
Carlos Martín Nieto [Mon, 2 May 2016 15:36:58 +0000 (17:36 +0200)]
Introduce a function to create a tree based on a different one

Instead of going through the usual steps of reading a tree recursively
into an index, modifying it and writing it back out as a tree, introduce
a function to perform simple updates more efficiently.

`git_tree_create_updated` avoids reading trees which are not modified
and supports upsert and delete operations. It is not as versatile as
modifying the index, but it makes some common operations much more
efficient.

8 years agoMerge pull request #3767 from pks-t/pks/misc-fixes
Edward Thomson [Mon, 9 May 2016 13:58:44 +0000 (08:58 -0500)]
Merge pull request #3767 from pks-t/pks/misc-fixes

Misc fixes

8 years agoMerge pull request #3773 from lucasderraugh/patch-1
Edward Thomson [Sun, 8 May 2016 22:48:22 +0000 (17:48 -0500)]
Merge pull request #3773 from lucasderraugh/patch-1

Fix unused variable 'message' warning

8 years agoMerge pull request #3757 from johnhaley81/jh/fix-create-initial-commit
Carlos Martín Nieto [Fri, 6 May 2016 16:44:37 +0000 (18:44 +0200)]
Merge pull request #3757 from johnhaley81/jh/fix-create-initial-commit

Fix `git_commit_create` for an initial commit

8 years agoFix unused variable 'message' warning
Lucas Derraugh [Fri, 6 May 2016 03:34:23 +0000 (23:34 -0400)]
Fix unused variable 'message' warning

8 years agoFix initial commit test
John Haley [Wed, 4 May 2016 18:14:17 +0000 (11:14 -0700)]
Fix initial commit test

`test_commit_commit__create_initial_commit_parent_not_current` was not correctly
testing that `HEAD` was not changed. Now we grab the oid that it was pointing to
before the call to `git_commit_create` and the oid that it's pointing to afterwards
and compare those.

8 years agoMerge pull request #3769 from libgit2/ethomson/rebase_inmemory_no_base
Carlos Martín Nieto [Wed, 4 May 2016 17:05:38 +0000 (19:05 +0200)]
Merge pull request #3769 from libgit2/ethomson/rebase_inmemory_no_base

Rebase: rebase a branch with no merge base for in-memory

8 years agoAdd tests for creating an initial commit
John Haley [Tue, 3 May 2016 20:32:22 +0000 (13:32 -0700)]
Add tests for creating an initial commit

8 years agoFix `git_commit_create` for an initial commit
John Haley [Tue, 26 Apr 2016 15:09:04 +0000 (08:09 -0700)]
Fix `git_commit_create` for an initial commit

When calling `git_commit_create` with an empty array of `parents` and `parent_count == 0`
the call will segfault at https://github.com/libgit2/libgit2/blob/master/src/commit.c#L107
when it's trying to compare `current_id` to a null parent oid.

This just puts in a check to stop that segfault.

8 years agorebase: handle no common ancestor for inmemory
Edward Thomson [Tue, 3 May 2016 19:29:50 +0000 (15:29 -0400)]
rebase: handle no common ancestor for inmemory

8 years agorebase: test rebase (merge) w/ no common ancestor
Edward Thomson [Tue, 3 May 2016 19:22:22 +0000 (15:22 -0400)]
rebase: test rebase (merge) w/ no common ancestor

8 years agodiff: simplify code for handling empty dirs
Patrick Steinhardt [Tue, 3 May 2016 15:36:09 +0000 (17:36 +0200)]
diff: simplify code for handling empty dirs

When determining diffs between two iterators we may need to
recurse into an unmatched directory for the "new" iterator when
it is either a prefix to the current item of the "old" iterator
or when untracked/ignored changes are requested by the user and
the directory is untracked/ignored.

When advancing into the directory and no files are found, we will
get back `GIT_ENOTFOUND`. If so, we simply skip the directory,
handling resulting unmatched old items in the next iteration. The
other case of `iterator_advance_into` returning either
`GIT_NOERROR` or any other error but `GIT_ENOTFOUND` will be
handled by the caller, which will now either compare the first
directory entry of the "new" iterator in case of `GIT_ENOERROR`
or abort on other cases.

Improve readability of the code to make the above logic more
clear.

8 years agoMerge pull request #3759 from libgit2/cmn/faster-header
Edward Thomson [Mon, 2 May 2016 17:59:51 +0000 (13:59 -0400)]
Merge pull request #3759 from libgit2/cmn/faster-header

odb: avoid inflating the full delta to read the header

8 years agodelta-apply: fix sign extension
Patrick Steinhardt [Mon, 2 May 2016 14:49:59 +0000 (16:49 +0200)]
delta-apply: fix sign extension

We compute offsets by executing `off |= (*delta++ << 24)` for
multiple constants, where `off` is of type `size_t` and `delta`
is of type `unsigned char`. The usual arithmetic conversions (see
ISO C89 §3.2.1.5 "Usual arithmetic conversions") kick in here,
causing us to promote both operands to `int` and then extending
the result to an `unsigned long` when OR'ing it with `off`.
The integer promotion to `int` may result in wrong size
calculations for big values.

Fix the issue by making the constants `unsigned long`, causing both
operands to be promoted to `unsigned long`.

8 years agoodb_loose: fix undefined behavior when computing size
Patrick Steinhardt [Mon, 2 May 2016 14:24:14 +0000 (16:24 +0200)]
odb_loose: fix undefined behavior when computing size

An object's size is computed by reading the object header's size
field until the most significant bit is not set anymore. To get
the total size, we increase the shift on each iteration and add
the shifted value to the total size.

We read the current value into a variable of type `unsigned
char`, from which we then take all bits except the most
significant bit and shift the result. We will end up with a
maximum shift of 60, but this exceeds the width of the value's
type, resulting in undefined behavior.

Fix the issue by instead reading the values into a variable of
type `unsigned long`, which matches the required width. This is
equivalent to git.git, which uses an `unsigned long` as well.

8 years agocheckout: set ignorecase=0 when config lookup fails
Patrick Steinhardt [Mon, 2 May 2016 13:47:54 +0000 (15:47 +0200)]
checkout: set ignorecase=0 when config lookup fails

When `git_repository__cvar` fails we may end up with a
`ignorecase` value of `-1`. As we subsequently check if
`ignorecase` is non-zero, we may end up reporting that data
should be removed when in fact it should not.

Err on the safer side and set `ignorecase = 0` when
`git_repository__cvar` fails.

8 years agomerge_file: do not unnecessarily check ours/theirs for NULL
Patrick Steinhardt [Mon, 2 May 2016 12:46:14 +0000 (14:46 +0200)]
merge_file: do not unnecessarily check ours/theirs for NULL

The `merge_file__xdiff` function checks if either `ours` or
`theirs` is `NULL`. The function is to be called with existing
files, though, and in fact already unconditionally dereferences
both pointers.

Remove the unnecessary check to silence warnings.

8 years agoodb: avoid inflating the full delta to read the header
Carlos Martín Nieto [Wed, 27 Apr 2016 10:00:31 +0000 (12:00 +0200)]
odb: avoid inflating the full delta to read the header

When we read the header, we want to know the size and type of the
object. We're currently inflating the full delta in order to read the
first few bytes. This can mean hundreds of kB needlessly inflated for
large objects.

Instead use a packfile stream to read just enough so we can read the two
varints in the header and avoid inflating most of the delta.

8 years agoindex: fix memory leak on error case
Patrick Steinhardt [Mon, 2 May 2016 12:30:14 +0000 (14:30 +0200)]
index: fix memory leak on error case

8 years agoMerge pull request #3764 from libgit2/ethomson/cmake_pc
Carlos Martín Nieto [Fri, 29 Apr 2016 16:34:03 +0000 (18:34 +0200)]
Merge pull request #3764 from libgit2/ethomson/cmake_pc

cmake: include threading libraries in pkg-config

8 years agocmake: include threading libraries in pkg-config
Edward Thomson [Fri, 29 Apr 2016 14:18:04 +0000 (10:18 -0400)]
cmake: include threading libraries in pkg-config

Include any required threading libraries in our `libgit2.pc`.

8 years agoMerge pull request #3763 from libgit2/ethomson/signature_from_buffer
Carlos Martín Nieto [Fri, 29 Apr 2016 08:36:01 +0000 (10:36 +0200)]
Merge pull request #3763 from libgit2/ethomson/signature_from_buffer

Introduce `git_signature_from_buffer`

8 years agoMerge pull request #3760 from backhub/bug/openssl_read
Edward Thomson [Fri, 29 Apr 2016 02:32:20 +0000 (22:32 -0400)]
Merge pull request #3760 from backhub/bug/openssl_read

Fix return value of openssl_read (infinite loop)

8 years agoIntroduce `git_signature_from_buffer`
Edward Thomson [Thu, 28 Apr 2016 16:47:14 +0000 (12:47 -0400)]
Introduce `git_signature_from_buffer`

Allow users to construct a signature from the type of signature
lines that actually appear in commits.

8 years agoFix style: no braces
Christian Schlack [Wed, 27 Apr 2016 11:56:16 +0000 (13:56 +0200)]
Fix style: no braces

8 years agoMerge pull request #3758 from libgit2/ethomson/annotated_commit_refs
Carlos Martín Nieto [Tue, 26 Apr 2016 19:21:27 +0000 (21:21 +0200)]
Merge pull request #3758 from libgit2/ethomson/annotated_commit_refs

Annotated commits: differentiate between the ref names and the description

8 years agoannotated_commit: provide refs and description
Edward Thomson [Tue, 26 Apr 2016 15:39:53 +0000 (11:39 -0400)]
annotated_commit: provide refs and description

Differentiate between the ref_name used to create an annotated_commit
(that can subsequently be used to look up the reference) and the
description that we resolved this with (which _cannot_ be looked up).

The description is used for things like reflogs (and may be a ref name,
and ID something that we revparsed to get here), while the ref name must
actually be a reference name, and is used for things like rebase to
return to the initial branch.

8 years agoFix return value of openssl_read (infinite loop)
Christian Schlack [Tue, 26 Apr 2016 16:04:03 +0000 (18:04 +0200)]
Fix return value of openssl_read (infinite loop)

openssl_read should return -1 in case of error.

SSL_read returns values <= 0 in case of error.

A return value of 0 can lead to an infinite loop, so the return value
of ssl_set_error will be returned if SSL_read is not successful (analog
to openssl_write).

8 years agorebase::abort: test we can abort rebase by revspec
Edward Thomson [Tue, 26 Apr 2016 15:48:11 +0000 (11:48 -0400)]
rebase::abort: test we can abort rebase by revspec

Test that we can properly abort a rebase when it is initialized by a
revspec.  This ensures that we do not conflate revspecs and refnames.

8 years agoMerge pull request #3755 from arthurschreiber/patch-9
Carlos Martín Nieto [Tue, 26 Apr 2016 11:40:03 +0000 (13:40 +0200)]
Merge pull request #3755 from arthurschreiber/patch-9

Remove traces of `git_blob_create_fromchunks`

8 years agoRemove traces of `git_blob_create_fromchunks`
Arthur Schreiber [Tue, 26 Apr 2016 09:10:31 +0000 (11:10 +0200)]
Remove traces of `git_blob_create_fromchunks`

8 years agoMerge pull request #3749 from arthurschreiber/arthur/add-git-reference-dup
Carlos Martín Nieto [Tue, 26 Apr 2016 09:02:45 +0000 (11:02 +0200)]
Merge pull request #3749 from arthurschreiber/arthur/add-git-reference-dup

Allow creating copies of `git_reference` objects.

8 years agoMerge pull request #3748 from libgit2/ethomson/rebase_detached
Carlos Martín Nieto [Tue, 26 Apr 2016 09:02:05 +0000 (11:02 +0200)]
Merge pull request #3748 from libgit2/ethomson/rebase_detached

Rebase improvements with IDs

8 years agoMerge pull request #3752 from libgit2/cmn/silly-tags
Edward Thomson [Mon, 25 Apr 2016 13:45:27 +0000 (09:45 -0400)]
Merge pull request #3752 from libgit2/cmn/silly-tags

tag: ignore extra header fields

8 years agotag: ignore extra header fields
Carlos Martín Nieto [Mon, 25 Apr 2016 10:16:05 +0000 (12:16 +0200)]
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.

8 years agoAllow creating copies of `git_reference` objects.
Arthur Schreiber [Fri, 22 Apr 2016 17:34:17 +0000 (10:34 -0700)]
Allow creating copies of `git_reference` objects.

8 years agoMerge pull request #3747 from libgit2/ethomson/warnings
Carlos Martín Nieto [Fri, 22 Apr 2016 13:40:08 +0000 (15:40 +0200)]
Merge pull request #3747 from libgit2/ethomson/warnings

:zap: some warnings

8 years agorebase: correctly finish rebasing detached heads
Edward Thomson [Thu, 21 Apr 2016 22:16:37 +0000 (18:16 -0400)]
rebase: correctly finish rebasing detached heads

When rebasing with IDs, we do not return to the `branch`,
we remain in a detached HEAD state.

8 years agorebase: handle detached HEADs in `init`
Edward Thomson [Thu, 21 Apr 2016 21:29:19 +0000 (17:29 -0400)]
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.

8 years agorebase: test abort immediately after init
Edward Thomson [Thu, 21 Apr 2016 21:03:21 +0000 (17:03 -0400)]
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`.

8 years agoclone test: annotate unused vars
Edward Thomson [Thu, 21 Apr 2016 15:05:21 +0000 (11:05 -0400)]
clone test: annotate unused vars

8 years agotransport: cast away constness for free
Edward Thomson [Thu, 21 Apr 2016 15:02:31 +0000 (11:02 -0400)]
transport: cast away constness for free

8 years agostransport: pass proxy opts instead of char*
Edward Thomson [Thu, 21 Apr 2016 15:01:09 +0000 (11:01 -0400)]
stransport: pass proxy opts instead of char*

8 years agoiterator: ignore submodule in has_ended
Edward Thomson [Thu, 21 Apr 2016 14:58:22 +0000 (10:58 -0400)]
iterator: ignore submodule in has_ended

8 years agoMerge pull request #3110 from libgit2/cmn/proxy-config
Edward Thomson [Tue, 19 Apr 2016 23:48:52 +0000 (19:48 -0400)]
Merge pull request #3110 from libgit2/cmn/proxy-config

Proxy configuration

8 years agoCI: download the proxy jar also on mingw
Carlos Martín Nieto [Tue, 19 Apr 2016 21:05:16 +0000 (23:05 +0200)]
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.

8 years agoMerge pull request #3745 from libgit2/cmn/ignore-starstar
Edward Thomson [Tue, 19 Apr 2016 19:24:14 +0000 (15:24 -0400)]
Merge pull request #3745 from libgit2/cmn/ignore-starstar

Improve star-star matching

8 years agoignore: move star-star matching closer to it use
Carlos Martín Nieto [Mon, 18 Apr 2016 14:05:12 +0000 (16:05 +0200)]
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.

8 years agoignore: fix directory limits when searching for star-star
Carlos Martín Nieto [Mon, 18 Apr 2016 11:34:18 +0000 (13:34 +0200)]
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.

8 years agoCI: run proxy tests with ctest
Carlos Martín Nieto [Tue, 19 Apr 2016 08:50:30 +0000 (10:50 +0200)]
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.

8 years agoproxy: don't specify the protocol in the type
Carlos Martín Nieto [Mon, 14 Mar 2016 16:36:04 +0000 (17:36 +0100)]
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.

8 years agoCI: start the proxy before the build so it's ready
Carlos Martín Nieto [Mon, 14 Mar 2016 12:42:10 +0000 (13:42 +0100)]
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.

8 years agowinhttp: correctly detect HTTPS usage
Carlos Martín Nieto [Wed, 30 Sep 2015 15:42:53 +0000 (17:42 +0200)]
winhttp: correctly detect HTTPS usage

8 years agocurl: ask for proxy credentials
Carlos Martín Nieto [Fri, 2 Oct 2015 08:11:43 +0000 (10:11 +0200)]
curl: ask for proxy credentials

8 years agoproxy: add a payload field for the proxy options
Carlos Martín Nieto [Fri, 2 Oct 2015 08:10:13 +0000 (10:10 +0200)]
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.

8 years agonet: use proxy options struct in the stream config
Carlos Martín Nieto [Mon, 21 Sep 2015 20:38:50 +0000 (22:38 +0200)]
net: use proxy options struct in the stream config

8 years agoproxy: don't require the trailing slash on WinHTTP
Carlos Martín Nieto [Wed, 23 Sep 2015 02:39:05 +0000 (04:39 +0200)]
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.

8 years agoproxy: test proxy support on Travis
Carlos Martín Nieto [Mon, 21 Sep 2015 19:40:37 +0000 (21:40 +0200)]
proxy: test proxy support on Travis

8 years agonetops: make the path optional in URLs
Carlos Martín Nieto [Mon, 21 Sep 2015 19:11:02 +0000 (21:11 +0200)]
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.

8 years agoproxy: use poxy to test our Windows proxy support
Carlos Martín Nieto [Wed, 29 Jul 2015 19:23:56 +0000 (21:23 +0200)]
proxy: use poxy to test our Windows proxy support

8 years agoproxy: ask the user for credentials if necessary
Carlos Martín Nieto [Thu, 7 May 2015 10:57:56 +0000 (12:57 +0200)]
proxy: ask the user for credentials if necessary

8 years agoproxy: introduce a proxy options struct
Carlos Martín Nieto [Mon, 11 May 2015 14:35:24 +0000 (16:35 +0200)]
proxy: introduce a proxy options struct

It is currently unused; it will go into the remote's options.

8 years agoAdd more tests for path matching with globs and path delimiters
Antonio Scandurra [Thu, 31 Mar 2016 15:38:40 +0000 (17:38 +0200)]
Add more tests for path matching with globs and path delimiters

8 years agoMerge pull request #3740 from Qix-/patch-1
Carlos Martín Nieto [Wed, 13 Apr 2016 09:51:05 +0000 (11:51 +0200)]
Merge pull request #3740 from Qix-/patch-1

Add missing ')' to callbacks documentation

8 years agoAdd missing ')' to callbacks documentation
Josh Junon [Wed, 13 Apr 2016 04:50:18 +0000 (21:50 -0700)]
Add missing ')' to callbacks documentation

Super minor, but it was bugging me.

There was a missing closing paren in the docs.

8 years agoMerge pull request #3738 from ethomson/test_as_root
Carlos Martín Nieto [Mon, 11 Apr 2016 22:14:00 +0000 (00:14 +0200)]
Merge pull request #3738 from ethomson/test_as_root

tests: skip the unreadable file tests as root

8 years agotests: skip the unreadable file tests as root
Edward Thomson [Mon, 11 Apr 2016 17:39:31 +0000 (13:39 -0400)]
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.

8 years agoMerge pull request #3736 from libgit2/cmn/dwim-general-message
Edward Thomson [Mon, 11 Apr 2016 17:29:54 +0000 (13:29 -0400)]
Merge pull request #3736 from libgit2/cmn/dwim-general-message

refs: provide a more general error message for dwim

8 years agoMerge pull request #3737 from ethomson/strict-object
Carlos Martín Nieto [Mon, 11 Apr 2016 17:24:47 +0000 (19:24 +0200)]
Merge pull request #3737 from ethomson/strict-object

Strict object creation in `refs::create`

8 years agorefs::create: strict object creation on by default
Edward Thomson [Mon, 11 Apr 2016 15:50:11 +0000 (11:50 -0400)]
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.

8 years agoreset: use real ids for the tests
Carlos Martín Nieto [Mon, 11 Apr 2016 09:37:02 +0000 (11:37 +0200)]
reset: use real ids for the tests

This lets us run with strict object creation on.

8 years agorefs: provide a more general error message for dwim
Carlos Martín Nieto [Mon, 11 Apr 2016 15:43:07 +0000 (17:43 +0200)]
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.

8 years agoMerge pull request #3730 from andhe/fix-stream-test
Edward Thomson [Wed, 6 Apr 2016 19:59:31 +0000 (15:59 -0400)]
Merge pull request #3730 from andhe/fix-stream-test

tests: fix core/stream test when built with openssl off

8 years agotests: fix core/stream test when built with openssl off
Andreas Henriksson [Wed, 6 Apr 2016 08:37:30 +0000 (10:37 +0200)]
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.

8 years agoMerge pull request #3728 from libgit2/cmn/no-embed
Edward Thomson [Tue, 5 Apr 2016 18:47:02 +0000 (14:47 -0400)]
Merge pull request #3728 from libgit2/cmn/no-embed

Remove Makefile.embed