Commit Graph

7913 Commits

Author SHA1 Message Date
Edward Thomson
828e595969 Merge pull request #2982 from libgit2/cmn/stream-check-ec
Don't ask for a stream's certificate unless it's encrypted
2015-03-17 09:44:56 -04:00
Edward Thomson
c07d02064d Merge pull request #2977 from pks-t/submodule-sync-url-fix
Fix git_submodule_sync writing URL to wrong key.
2015-03-17 09:44:25 -04:00
Carlos Martín Nieto
84d83b8e75 http: do not try to use the cert callback on unencrypted streams
When the user has a certificate check callback set, we still have to
check whether the stream we're using is even capable of providing a
certificate.

In the case of an unencrypted certificate, do not ask for it from the
stream, and do not call the callback.
2015-03-16 19:43:46 +01:00
Carlos Martín Nieto
29e7ae5d81 Add failing test for cert callback with non-ecrypted stream
When we have an HTTP stream and have set the certificatre check
callback, we currently fail as we ask the unencrypted stream for its
certificate.
2015-03-16 19:39:05 +01:00
Carlos Martín Nieto
d675982a15 Merge pull request #2975 from git-up/diff_index_retain
Avoid retaining / releasing the index more than necessary when GIT_DIFF_...
2015-03-15 00:24:36 +01:00
Carlos Martín Nieto
7c63a33ffe indexer: bring back the error message on duplcate commits
It turns out that erroring out on duplicate commits is the right thing
to do, but git was not hitting the bug on the server-side.

Bring back a descriptive error message in case of duplicate entries and
error out.
2015-03-13 19:41:40 +01:00
Carlos Martín Nieto
dccf59ad38 indexer: don't worry about duplicate objects
If a packfile includes duplicate objects, we can choose to use the
secon copy instead of the first by using the same logic as if it were
the first.

Change the error condition from 0 to -1, which indicates a bad resize,
and set the OOM message in that case.

This does mean we will leak the first copy of the object. We can deal
with that later, but making fetches work is more important.
2015-03-13 18:28:07 +01:00
Carlos Martín Nieto
a34692c419 indexer: set an error message on duplicate objects in pack
While this is not even close to a fix, we can at least set an error
message so we know which error we are facing. Up to know we just
returned an error without a message.
2015-03-13 18:00:15 +01:00
Carlos Martín Nieto
e5e2c11d5d Put back the number of expected references to 6 from the test repo
This was but down to 5 when GitHub made a change to their server which
made them stop honouring the include-tag request.

This has recently been corrected, so we can bring it back up to six.
2015-03-13 17:52:07 +01:00
Edward Thomson
12e1fff79d Merge pull request #2973 from libgit2/cmn/local-pack-threading
local: create pack with multiple threads
2015-03-12 18:04:25 -04:00
Patrick Steinhardt
e6903ea278 Fix git_submodule_sync writing URL to wrong key.
Currently git_submodule_sync writes the submodule's URL to the
key 'branch.<REMOTE_NAME>.remote' while the reference
implementation of `git submodule sync` writes to
'remote.<REMOTE_NAME>.url', which is the intended behavior
according to git-submodule(1).
2015-03-12 16:05:07 +01:00
Pierre-Olivier Latour
8a3934e49b Avoid retaining / releasing the index more than necessary when GIT_DIFF_UPDATE_INDEX is enabled 2015-03-11 19:29:36 -07:00
Carlos Martín Nieto
15f581747c Merge commit 'refs/pull/2879/head' of ssh://github.com/libgit2/libgit2 2015-03-11 17:55:39 +01:00
Carlos Martín Nieto
0ef54a6358 local: create pack with multiple threads
The default behaviour for the packbuilder is to perform the work in a
single thread, which is fine for the public API, but we currently have
no way for a user to determine the number of threads to use when
creating the packfile, which makes our clone behaviour over the
filesystem quite a bit slower than what git offers.

This is a very particular scenario, in which we avoid spawning git by
being ourselves the server-side, so it's probably ok to auto-set the
threading, as the upload-pack process would do if we were talking to
git.
2015-03-11 17:24:14 +01:00
Carlos Martín Nieto
61ccba0d56 Merge pull request #2969 from adrienthebo/remote_add_invalid_refspec
refspec: report errors when parsing an invalid refspec
2015-03-11 16:13:31 +01:00
Carlos Martín Nieto
522df1cf1d Merge pull request #2970 from ethomson/inmemory_bare
"In-memory" repos are bare by default
2015-03-11 03:03:54 +01:00
Carlos Martín Nieto
c23f90053d Merge pull request #2971 from ethomson/revert_fastfail
Revert "fastfail" from the mingw PR
2015-03-11 02:14:22 +01:00
Edward Thomson
70c735e190 repository_new: test its bareness 2015-03-10 16:49:24 -04:00
Adrien Thebo
b523194d21 refspec: set err message on invalid refspec
If a refspec could not be parsed, the git_refspec__parse function would
return an error value but would not provide additional error information
for the callers. This commit amends that function to set a more useful
error message.
2015-03-10 13:31:26 -07:00
Edward Thomson
9a08b3196f Revert "add fast-fail feature for pending builds in PR's"
This reverts commit 8008ab6a41.
2015-03-10 16:08:44 -04:00
Edward Thomson
3e32986114 Revert "Implement fail-fast for Travis as well"
This reverts commit ba6c53b91b.
2015-03-10 16:08:34 -04:00
Edward Thomson
770aca94bd repository: in-memory repos are bare by default 2015-03-10 15:02:02 -04:00
Edward Thomson
d7c81945b0 Merge pull request #2964 from git-up/fixes
Fixes
2015-03-09 10:18:39 -04:00
Edward Thomson
959482e104 Merge pull request #2946 from tkelman/appveyor-mingw
RFC: add mingw to appveyor matrix
2015-03-09 09:18:37 -04:00
Pierre-Olivier Latour
2461e0d20f Removed unnecessary GIT_CHECKOUT_SKIP_UNMERGED for GIT_RESET_HARD 2015-03-08 14:10:02 -07:00
Pierre-Olivier Latour
b5ab878f4c Fixed build warning 2015-03-08 14:09:50 -07:00
Carlos Martín Nieto
d77a4f943e Merge pull request #2963 from libgit2/cmn/rename-reflog
refdb: use the same id for old and new when renaming a reference
2015-03-08 19:58:51 +01:00
Carlos Martín Nieto
d578b45f3f refdb: use the same id for old and new when renaming a reference
When we rename a reference, we want the old and new ids to be the same
one (as we did not change it). The normal code path looks up the old id
from the current value of the brtanch, but by the time we look it up, it
does not exist anymore and thus we write a zero id.

Pass the old id explicitly instead.
2015-03-08 16:50:27 +01:00
Edward Thomson
01c3b184d3 Merge pull request #2961 from ethomson/filter_relative_paths
Filter relative paths
2015-03-06 16:52:07 -05:00
Carlos Martín Nieto
91de1b0937 Merge pull request #2950 from libgit2/ntk/reflog_branch_create
branch: fix generated reflog message upon creation
2015-03-06 22:44:15 +01:00
Edward Thomson
6a2edc5a11 filter: accept relative paths in apply_to_file 2015-03-06 15:16:40 -05:00
Edward Thomson
0b3dd8fbed filter::file tests: test filter_list_apply_to_file
Test that filter_list_apply_to_file works and can accept repo-relative
paths.
2015-03-06 15:16:05 -05:00
Matti Virolainen
78c34af016 Use secure API if available. 2015-03-06 12:07:54 -08:00
Tony Kelman
04c5a9c083 Add some missing definitions for mingw.org
these shouldn't be necessary if _WIN32_WINNT >= _WIN32_WINNT_VISTA
2015-03-06 12:07:05 -08:00
Tony Kelman
1a7ea63d22 Move definitions of strcasecmp and strncasecmp to msvc-compat.h
should cut down on compiler warnings with mingw
2015-03-06 12:07:05 -08:00
Edward Thomson
9a823badbf filter: drop old TODO 2015-03-06 14:37:41 -05:00
Tony Kelman
2326ea68b5 Allow failures on mingw for now 2015-03-05 18:12:32 -08:00
Tony Kelman
063532825c Only run -ionline tests IF (WINHTTP OR OPENSSL_FOUND) 2015-03-05 15:48:08 -08:00
Tony Kelman
4c88fd7ce6 Add MinGW-w64 to matrix
cache mingw-w64 downloads

quiet curl and 7zip

run appveyor steps in cmd for mingw
2015-03-04 16:52:37 -08:00
nulltoken
05e644dd7e Drop trailing whitespaces 2015-03-04 22:09:51 +01:00
nulltoken
7eb7673406 branch: fix generated reflog message upon renaming 2015-03-04 22:09:49 +01:00
nulltoken
015d4b7b38 branch: fix generated reflog message upon creation 2015-03-04 22:09:44 +01:00
Tony Kelman
ba6c53b91b Implement fail-fast for Travis as well 2015-03-04 11:29:44 -08:00
Tony Kelman
8008ab6a41 add fast-fail feature for pending builds in PR's 2015-03-04 11:29:44 -08:00
Tony Kelman
ac5fad2780 add mingw to appveyor matrix
use MSYS makefiles generator

add bash script for running mingw on appveyor

add --login and fix run paths

use msys style path to appveyor-mingw.sh

add mingw path to /etc/fstab
2015-03-04 11:29:40 -08:00
Carlos Martín Nieto
bdf0e73450 Merge pull request #2932 from jeffhostetler/jeffhostetler/big_clone_crash
Fix crash in git_clone on extremely large repos
2015-03-04 14:55:56 +01:00
Carlos Martín Nieto
107958d717 Merge branch 'tls_data' 2015-03-04 14:53:02 +01:00
Edward Thomson
8e851c1e8c libgit2_shutdown: free TLS data (win32)
Free TLS data on thread exit (win32)
2015-03-04 14:48:46 +01:00
Edward Thomson
83fe60fa1b libgit2_shutdown: clear err message on shutdown
Clear the error message on git_libgit2_shutdown for all versions of
the library (no threads and Win32 threads).  Drop the giterr_clear
in clar, as that shouldn't be necessary.
2015-03-04 14:48:46 +01:00
Leo Yang
3a8b69d13d Fix leak of TLS error message in shutdown (ptherad version) 2015-03-04 14:47:57 +01:00