Commit Graph

11940 Commits

Author SHA1 Message Date
Edward Thomson
00c66dfd3b errors: update static analysis tools for giterr
Update GITERR and giterr usages in the static code analysis tools to use
the new names.
2019-01-22 22:30:37 +00:00
Edward Thomson
fcc7dcb176 errors: remove giterr usage in examples 2019-01-22 22:30:37 +00:00
Edward Thomson
115a6c50c9 errors: remove giterr usage in fuzzers 2019-01-22 22:30:37 +00:00
Edward Thomson
f673e232af git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related
functions.
2019-01-22 22:30:35 +00:00
Edward Thomson
647dfdb42d git_error: deprecate error values
Replace the `GITERR` values with a `const int` to deprecate error
values.
2019-01-22 22:26:51 +00:00
Edward Thomson
20961b9871 git_error: use full class name in public error API
Move to the `git_error` name in error-related functions, deprecating the
`giterr` functions.  This means, for example, that `giterr_last` is now
`git_error_last`.  The old names are retained for compatibility.

This only updates the public API; internal API and function usage
remains unchanged.
2019-01-22 22:26:51 +00:00
Edward Thomson
6b2cd0ed59 Merge pull request #4949 from zlikavac32/fix-odb-foreach-cb-positive-error-code
odb: Fix odb foreach to also close on positive error code
2019-01-20 20:55:00 +00:00
Marijan Šuflaj
f7416509c0 Fix odb foreach to also close on positive error code
In include/git2/odb.h it states that callback can also return
positive value which should break looping.

Implementations of git_odb_foreach() and pack_backend__foreach()
did not respect that.
2019-01-20 20:15:31 +01:00
Edward Thomson
68166017dc Merge pull request #4948 from libgit2/ethomson/memleaks
repository: free memory in symlink detection function
2019-01-20 18:33:36 +00:00
Edward Thomson
b8b796c14a repository: free memory in symlink detection function 2019-01-20 18:09:43 +00:00
Edward Thomson
1e92a0363d Merge pull request #4947 from libgit2/ethomson/proxyupdate
ci: update poxyproxy, run in quiet mode
2019-01-20 17:59:50 +00:00
Edward Thomson
c9d9e25fb1 ci: update poxyproxy, run in quiet mode
Update the proxy so that we can enable a quiet mode.
2019-01-20 17:35:50 +00:00
Edward Thomson
86b522bdef Merge pull request #4945 from libgit2/ethomson/fix-intrinsics
Add/multiply with overflow tweaks
2019-01-20 14:27:57 +00:00
Edward Thomson
b5a3ef3cc6 Merge pull request #4944 from libgit2/ethomson/deprecation
Improve deprecation of old enums
2019-01-20 14:27:25 +00:00
Edward Thomson
75444d97fd add with overflow: correct documentation
Correct the documentation on the fallback add/multiply with overflow
functions.
2019-01-20 13:52:46 +00:00
Edward Thomson
abbc07f12f add with overflow: use SizeTAdd on Windows
Windows provides <intsafe.h> which provides "performant" add and
multiply with overflow operations.  Use them when possible.
2019-01-20 13:51:15 +00:00
Edward Thomson
c6d47acfbf Remove unused git__add_uint64_overflow 2019-01-20 13:04:10 +00:00
Edward Thomson
f04f1c7eed add with overflow intrinsics: simplify tests
Use the smallest unsigned type that is equivalent to `size_t` to
simplify the conditionals.  Error if we're on a system that we believe
offers builtins but we cannot determine which one to use.
2019-01-20 13:00:53 +00:00
Edward Thomson
1b2af79e85 deprecation: use the enum type in declaration
The C standard does not specify whether an enum is a signed or unsigned
type.  Obviously, any enum that includes negative values _must_ be
signed, but if all values are positive then the compiler is free to
choose signed or unsigned.

Thus, by changing the type signatures to `git_object_t` and declaring
the old `GIT_OBJ_` values as a signed or unsigned int, we risk a
mismatch between what the compiler has chosen for a `git_object_t`'s
type and our type declaration.

Thus, we declare the deprecated values as the enum instead of guessing.
2019-01-20 10:49:23 +00:00
Edward Thomson
44827b6764 deprecation: add used attribute
Recent GCC enables `-Wunused-const-variables`, which makes output quite
noisy.  Disable unused warnings for our deprecated variables.
2019-01-20 10:36:41 +00:00
Edward Thomson
1758636b13 Merge pull request #4939 from libgit2/ethomson/git_ref
Move `git_ref_t` to `git_reference_t`
2019-01-19 01:38:34 +00:00
Edward Thomson
b2c2dc643b Merge pull request #4940 from libgit2/ethomson/git_obj
More `git_obj` to `git_object` updates
2019-01-19 01:36:40 +00:00
Edward Thomson
c352e5617a Merge pull request #4943 from libgit2/ethomson/ci
ci: only run invasive tests in nightly
2019-01-19 01:34:21 +00:00
Edward Thomson
e2b9f56878 ci: run all invasive tests on windows 2019-01-19 01:16:45 +00:00
Edward Thomson
1ebf3a7dec ci: only run invasive tests during nightly runs 2019-01-19 01:16:45 +00:00
Edward Thomson
6b8a648f6f ci: clear settings variables in powershell 2019-01-19 00:38:00 +00:00
Edward Thomson
423d3e738a ci: precisely identify the invasive tests 2019-01-19 00:08:05 +00:00
Edward Thomson
4e0c8a1e73 Merge pull request #4930 from libgit2/ethomson/cdecl
Always build a cdecl library
2019-01-17 22:07:24 +00:00
Edward Thomson
38e61797b5 changelog: document that we always build cdecl 2019-01-17 21:18:14 +00:00
Edward Thomson
22d2062d95 Introduce GIT_CALLBACK macro to enforce cdecl
Since we now always build the library with cdecl calling conventions,
our callbacks should be decorated as such so that users will not be able
to provide callbacks defined with other calling conventions.

The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
appropriate.
2019-01-17 21:17:32 +00:00
Edward Thomson
57b753a0dc cmake: error when STDCALL is specified
To explicitly break end-users who were specifying STDCALL, explicitly
fail the cmake process to ensure that they know that they need to change
their bindings.  Otherwise, we would quietly ignore their option and the
resulting cdecl library would produced undefined behavior.
2019-01-17 21:17:32 +00:00
Edward Thomson
a74dd39b23 Use cdecl calling conventions on Win32
The recommendation from engineers within Microsoft is that libraries
should have a calling convention specified in the public API, and that
calling convention should be cdecl unless there are strong reasons to
use a different calling convention.

We previously offered end-users the choice between cdecl and stdcall
calling conventions.  We did this for presumed wider compatibility: most
Windows applications will use cdecl, but C# and PInvoke default to
stdcall for WINAPI compatibility.  (On Windows, the standard library
functions are are stdcall so PInvoke also defaults to stdcall.)

However, C# and PInvoke can easily call cdecl APIs by specifying an
annotation.

Thus, we will explicitly declare ourselves cdecl and remove the option
to build as stdcall.
2019-01-17 21:17:32 +00:00
Edward Thomson
b78bcbb9b1 buffer: wrap EXTERN in DEPRECATED
The GIT_EXTERN macro needs to provide order-specific attributes; update
users of the GIT_DEPRECATED macro to allow for that.
2019-01-17 21:17:32 +00:00
Edward Thomson
6e17bfda57 Merge pull request #4932 from libgit2/ethomson/changelog
changelog: document changes since 0.27
2019-01-17 20:15:34 +00:00
Edward Thomson
6a0e94572b changelog: document git_merge_analysis_for_ref 2019-01-17 20:14:46 +00:00
Edward Thomson
35be7f1f28 changelog: document openssl fixes 2019-01-17 20:14:46 +00:00
Edward Thomson
85feb28a1b changelog: document core.logallrefupdates=always 2019-01-17 20:14:46 +00:00
Edward Thomson
a6e5d46bb1 fixup! changelog: document changes since 0.27 2019-01-17 20:14:46 +00:00
Edward Thomson
1bb03f7ac1 changelog: document changes since 0.27 2019-01-17 20:14:46 +00:00
Edward Thomson
abe2367579 Merge pull request #4925 from lhchavez/fix-a-bunch-of-warnings
Fix a bunch of warnings
2019-01-17 20:09:05 +00:00
Edward Thomson
cecbe7462d Merge pull request #4941 from libgit2/ethomson/mailmap
mailmap: prefer ethomson@edwardthomson.com
2019-01-17 13:14:25 +00:00
Edward Thomson
d4cbe9ef3d mailmap: prefer ethomson@edwardthomson.com
My @github.com address is no more.
2019-01-17 12:34:44 +00:00
Edward Thomson
83151018ef object_type: convert final internal users to new names
Update some missed types that were continuing to use the old `GIT_OBJ`
names.
2019-01-17 11:03:19 +00:00
Edward Thomson
cd35085220 object_type: GIT_OBJECT_BAD is now GIT_OBJECT_INVALID
We use the term "invalid" to refer to bad or malformed data, eg
`GIT_REF_INVALID` and `GIT_EINVALIDSPEC`.  Since we're changing the
names of the `git_object_t`s in this release, update it to be
`GIT_OBJECT_INVALID` instead of `BAD`.
2019-01-17 10:54:03 +00:00
Edward Thomson
9004689957 object_type: mark old values as deprecated
Mark old object type values as `static const` so that we can mark them
as deprecated with the `GIT_DEPRECATED` macro.
2019-01-17 10:53:41 +00:00
Edward Thomson
ed8cfbf041 references: use new names in internal usage
Update internal usage to use the `git_reference` names for constants.
2019-01-17 10:32:29 +00:00
Edward Thomson
87fe578891 references: use full name in type names
Update the reference type names from an abbreviation (`git_ref`) to use
the fullname (`git_reference`).  This ensures that we are consistent
with our naming for reference types and functions throughout the
library.

The previous names are now marked as deprecated.
2019-01-17 10:32:29 +00:00
Edward Thomson
628ebc5168 Merge pull request #4937 from lhchavez/fix-crlf
Convert tests/resources/push.sh to LF endings
2019-01-15 08:56:04 +00:00
lhchavez
7a43a89286 Convert tests/resources/push.sh to LF endings
This changes that file to use UNIX line-endings, which makes sense since
this is a UNIXy file.
2019-01-15 00:42:14 +00:00
Edward Thomson
2c795807f7 Merge pull request #4936 from implausible/remove/unnecessary-test-files
Get rid of some test files that were accidentally committed
2019-01-14 23:34:23 +00:00