Commit Graph

8090 Commits

Author SHA1 Message Date
Carlos Martín Nieto
385449b1df note: use a git_buf to return the default namespace
The caller has otherwise no way to know how long the string will be
allocated or ability to free it.

This fixes #2944.
2015-03-17 20:50:02 +01:00
Tony Kelman
7aa96593fa set PKG_CONFIG_LIBDIR in toolchain-mingw32.cmake 2015-03-17 12:05:07 -07:00
Jacques Germishuys
70b0f128c8 Added changelog entries for whitespace and patience merges. 2015-03-17 16:34:36 +02:00
Edward Thomson
9bbc8f350b Merge pull request #2962 from libgit2/cmn/reflog-annotated
Add annotated versions of ref-modying functions
2015-03-17 10:21:28 -04:00
Edward Thomson
7800048afb Merge pull request #2972 from libgit2/cmn/pack-objects-walk
[WIP] Smarter pack-building
2015-03-17 10:06:50 -04:00
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
Tony Kelman
547517d7f9 use a different .def file for 64 bit 2015-03-16 14:59:20 -07:00
Claudiu Olteanu
118e6fdc8f Lower case the include directive of windows header
Since the Linux platform has a case sensitive file system, the header name should be lower case for cross compiling purposes. (On Linux, the mingw header is called ```windows.h```).
2015-03-16 23:08:16 +02:00
Tony Kelman
d612e48ecc Fix out-of-tree build
link against crypt32 for CertFreeCertificateContext
2015-03-16 13:59:33 -07:00
Alex Crichton
3066026b04 Fix build on mingw-w64 2015-03-16 13:59:29 -07:00
klutzy
e613e6ebb8 patch so mingw-w64 can build 2015-03-16 13:59:02 -07:00
Philip Kelley
8f426d7dd2 Win32: Enable WinHTTP for MinGW 2015-03-16 12:59:55 -07:00
Jeff Hostetler
fea24c5300 PERF: In MERGE, lazily compute is_binary 2015-03-16 15:54:53 -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
8acf058ff7 CHANGELOG: add notes about the annotated ref-modifying functions 2015-03-16 16:58:47 +01:00
Carlos Martín Nieto
a5815a2afb Add tests for the annotated versions of ref-modifying functions
This also brings the soft-reset tests back to life. The function name
was missing an underscore, meaning they had not been running.
2015-03-16 16:57:30 +01:00
Carlos Martín Nieto
62dd4d71db annotated_commit: provide a constructor from a revspec
This extra constructor will be useful for the annotated versions of
ref-modifying functions, as it allows us to create a commit with the
extended sha syntax which was used to retrieve it.
2015-03-16 16:57:30 +01:00
Carlos Martín Nieto
62d38a1ddb Add annotated commit versions of reflog-modifying functions
We do not always want to put the id directly into the reflog, but we
want to speicfy what a user typed. For this use-case we provide
annotated version of a few functions which let the caller specify what
user-friendly name was used when asking for the operation.
2015-03-16 16:57:30 +01:00
Jacques Germishuys
74c37c2a48 Added options to enable patience and minimal diff drivers 2015-03-16 09:53:27 +02:00
Jacques Germishuys
13de936316 Collapse whitespace flags into git_merge_file_flags_t 2015-03-16 09:53:27 +02:00
Jacques Germishuys
f29dde6828 Renamed git_merge_options 'flags' to 'tree_flags' 2015-03-16 09:53:27 +02:00
Jacques Germishuys
0f24cac2b9 Added tests to merge files and branches with whitespace problems and fixes 2015-03-16 09:53:27 +02:00
Jacques Germishuys
45a86bbfd0 Allow for merges with whitespace discrepancies 2015-03-16 09:53:27 +02: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
Pierre-Olivier Latour
1034f1b583 Fixed active refspecs not reset by git_remote_upload() 2015-03-11 11:51:12 -07:00
Pierre-Olivier Latour
e22ffb4209 Fixed update_tips callback called for failed pushed references
The current implementation does not set 'fire_callback' back to 0 for failed updates so the callback still fires.

Instead of adding yet another condition check to set 'fire_callback' to 0 if needed, considering this function should be a no-op for failed updates anyway, the best fix is to simplify its logic to check upfront if the update is a failed one.
2015-03-11 11:51:12 -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
e68b31a1a9 local: let the packbuilder perform smarter object insertion
Currently we use the most naïve and inefficient method for figuring out
which objects to send to the remote whereby we end up trying to insert
subdirs which have not changed multiple times.

Instead, make use of the packbuilder's built-in more efficient method
which uses the walk to feed the object list and avoids inserting an
object and its descendants.
2015-03-11 02:37:25 +01:00
Carlos Martín Nieto
04a36feff1 pack-objects: fill a packbuilder from a walk
Most use-cases for the object packer communicate in terms of commits
which each side has. We already have an object to specify this
relationship between commits, namely git_revwalk.

By knowing which commits we want to pack and which the other side
already has, we can perform similar optimisations to git, by marking
each tree as interesting or uninteresting only once, and not sending
those trees which we know the other side has.
2015-03-11 02:36:11 +01:00
Carlos Martín Nieto
b63b76e0b0 Reorder some khash declarations
Keep the definitions in the headers, while putting the declarations in
the C files. Putting the function definitions in headers causes
them to be duplicated if you include two headers with them.
2015-03-11 02:36:11 +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