Log

Author Commit Date CI Message
Marijan Šuflaj f7416509 2019-01-20T20:15:31 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.
Edward Thomson 68166017 2019-01-20T18:33:36 Merge pull request #4948 from libgit2/ethomson/memleaks repository: free memory in symlink detection function
Edward Thomson b8b796c1 2019-01-20T18:09:43 repository: free memory in symlink detection function
Edward Thomson 1e92a036 2019-01-20T17:59:50 Merge pull request #4947 from libgit2/ethomson/proxyupdate ci: update poxyproxy, run in quiet mode
Edward Thomson c9d9e25f 2019-01-20T17:34:41 ci: update poxyproxy, run in quiet mode Update the proxy so that we can enable a quiet mode.
Edward Thomson 86b522bd 2019-01-20T14:27:57 Merge pull request #4945 from libgit2/ethomson/fix-intrinsics Add/multiply with overflow tweaks
Edward Thomson b5a3ef3c 2019-01-20T14:27:25 Merge pull request #4944 from libgit2/ethomson/deprecation Improve deprecation of old enums
Edward Thomson 75444d97 2019-01-20T13:52:46 add with overflow: correct documentation Correct the documentation on the fallback add/multiply with overflow functions.
Edward Thomson abbc07f1 2019-01-20T13:51:15 add with overflow: use SizeTAdd on Windows Windows provides <intsafe.h> which provides "performant" add and multiply with overflow operations. Use them when possible.
Edward Thomson c6d47acf 2019-01-20T13:04:10 Remove unused git__add_uint64_overflow
Edward Thomson f04f1c7e 2019-01-20T13:00:53 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.
Edward Thomson 1b2af79e 2019-01-20T10:49:23 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.
Edward Thomson 44827b67 2019-01-20T10:36:41 deprecation: add `used` attribute Recent GCC enables `-Wunused-const-variables`, which makes output quite noisy. Disable unused warnings for our deprecated variables.
Edward Thomson 1758636b 2019-01-19T01:38:34 Merge pull request #4939 from libgit2/ethomson/git_ref Move `git_ref_t` to `git_reference_t`
Edward Thomson b2c2dc64 2019-01-19T01:36:40 Merge pull request #4940 from libgit2/ethomson/git_obj More `git_obj` to `git_object` updates
Edward Thomson c352e561 2019-01-19T01:34:21 Merge pull request #4943 from libgit2/ethomson/ci ci: only run invasive tests in nightly
Edward Thomson e2b9f568 2019-01-19T00:37:13 ci: run all invasive tests on windows
Edward Thomson 1ebf3a7d 2019-01-19T00:34:55 ci: only run invasive tests during nightly runs
Edward Thomson 6b8a648f 2019-01-19T00:25:16 ci: clear settings variables in powershell
Edward Thomson 423d3e73 2019-01-19T00:08:05 ci: precisely identify the invasive tests
Edward Thomson 4e0c8a1e 2019-01-17T22:07:24 Merge pull request #4930 from libgit2/ethomson/cdecl Always build a cdecl library
Edward Thomson 38e61797 2019-01-14T14:33:36 changelog: document that we always build cdecl
Edward Thomson 22d2062d 2019-01-09T18:25:10 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.
Edward Thomson 57b753a0 2019-01-09T12:47:40 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.
Edward Thomson a74dd39b 2019-01-09T12:33:47 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.
Edward Thomson b78bcbb9 2019-01-09T13:21:23 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.
Edward Thomson 6e17bfda 2019-01-17T20:15:34 Merge pull request #4932 from libgit2/ethomson/changelog changelog: document changes since 0.27
Edward Thomson 1bb03f7a 2019-01-10T21:32:05 changelog: document changes since 0.27
Edward Thomson 6a0e9457 2019-01-17T20:13:25 changelog: document git_merge_analysis_for_ref
Edward Thomson 35be7f1f 2019-01-10T23:49:24 changelog: document openssl fixes
Edward Thomson 85feb28a 2019-01-10T23:36:08 changelog: document core.logallrefupdates=always
Edward Thomson a6e5d46b 2019-01-17T20:12:04 fixup! changelog: document changes since 0.27
Edward Thomson abe23675 2019-01-17T20:09:05 Merge pull request #4925 from lhchavez/fix-a-bunch-of-warnings Fix a bunch of warnings
Edward Thomson cecbe746 2019-01-17T13:14:25 Merge pull request #4941 from libgit2/ethomson/mailmap mailmap: prefer ethomson@edwardthomson.com
Edward Thomson d4cbe9ef 2019-01-17T12:34:44 mailmap: prefer ethomson@edwardthomson.com My @github.com address is no more.
Edward Thomson 83151018 2019-01-17T10:47:32 object_type: convert final internal users to new names Update some missed types that were continuing to use the old `GIT_OBJ` names.
Edward Thomson cd350852 2019-01-17T10:40:13 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`.
Edward Thomson 90046899 2019-01-17T10:42:51 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.
Edward Thomson ed8cfbf0 2019-01-17T00:32:31 references: use new names in internal usage Update internal usage to use the `git_reference` names for constants.
Edward Thomson 87fe5788 2019-01-16T23:58:09 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.
Edward Thomson 628ebc51 2019-01-15T08:56:04 Merge pull request #4937 from lhchavez/fix-crlf Convert tests/resources/push.sh to LF endings
lhchavez 7a43a892 2019-01-15T00:42:14 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.
Edward Thomson 2c795807 2019-01-14T23:34:23 Merge pull request #4936 from implausible/remove/unnecessary-test-files Get rid of some test files that were accidentally committed
Tyler Wanek a653f967 2019-01-14T16:08:05 Get rid of some test files that were accidentally committed
Edward Thomson 5b08a71f 2019-01-14T21:00:42 Merge pull request #4934 from stinb/proxy-crash Fix crash on remote connection when GIT_PROXY_AUTO is set but no proxy is detected
Jason Haslam 35d86c77 2019-01-14T10:14:36 proxy: fix crash on remote connection with GIT_PROXY_AUTO but no proxy is detected
Etienne Samson 54ae0528 2019-01-14T01:25:05 tests: fix test expectation mismatch
Etienne Samson 1b4ba844 2019-01-11T11:53:54 ci: enable some of the invasive testcases
Etienne Samson 3c6d1979 2019-01-11T02:06:41 ci: move coverity in its own pipeline Since Coverity is down for a unspecified timeframe, isolate it from the "hosted" nightlies.
Edward Thomson 99afd41f 2019-01-10T21:38:24 Merge pull request #4924 from lhchavez/werror Make ENABLE_WERROR actually work
Edward Thomson 3afa1ede 2019-01-10T21:33:34 Merge pull request #4931 from tiennou/cmake/osx-deprecated-warn Remove unconditional -Wno-deprecated-declaration on macOS
Etienne Samson 2cc66dd5 2019-01-10T17:03:38 cmake: remove unconditional -Wno-deprecated-declaration on APPLE After taking into consideration the following, I think this should be removed : - OpenSSL isn't the default on Apple platforms - you have to jump through hoops to get CMake to use OpenSSL on macOS (headers aren't in `/usr/include`, so you have to provide `-DOPENSSL_*` overrides) - users are likely (as getting anywhere near the installed 0.9.8 version is insanity IMHO) to package a "modern" version, which wouldn't be marked as deprecated
lhchavez 6af6170b 2019-01-05T20:50:42 Make ENABLE_WERROR actually work This change explicitly adds -Werror to the CFLAGS. Due to the way that the ADD_C_FLAG_IF_SUPPORTED() macro was mangling the flag name to convert it into a define name, any warning that had a dash in its name was not being correctly enabled. Additionally, any flag that is enabled implicitly by the compiler (like -Wunused-result and -Wdeprecated-declarations) would not cause an error unless they were explicitly enabled with the ENABLE_WARNINGS() macro.
lhchavez 2848923a 2019-01-08T17:32:23 Let GCC use the add/mul overflow intrinsics This change tweaks the macros for git__{add,multiply}_sizet_overflow so that GCC can use them. It also stops using the uadd,umul versions since the add,mul can handle way more cases.
lhchavez c6bfaf14 2019-01-09T06:58:40 Explanation for the rationale behind splitting formatting
Edward Thomson 1305cd4e 2019-01-09T09:55:26 Merge pull request #4926 from csware/warning-c4133 Fix warning 'function': incompatible types - from 'git_cvar_value *' to 'int *' (C4133) on VS
Edward Thomson 924f61bf 2019-01-09T08:31:28 Merge pull request #4928 from lhchavez/fix-warnings Fix Linux warnings
lhchavez 728101e3 2019-01-08T17:35:16 Move the intrinsics part of the change to its own PR Less controversial changes together is better.
lhchavez 8b599528 2019-01-08T17:26:14 Fix Linux warnings This change fixes -Wmaybe-uninitialized and -Wdeprecated-declarations warnings on Linux builds
Edward Thomson 19bca3d3 2019-01-08T14:35:39 Merge pull request #4922 from tiennou/fix/coverity-cids Coverity fixes
Sven Strickroth 45001906 2019-01-07T16:14:51 Fix warning 'function': incompatible types - from 'git_cvar_value *' to 'int *' (C4133) on VS Signed-off-by: Sven Strickroth <email@cs-ware.de>
lhchavez 321d19c1 2019-01-06T08:36:06 Windows is hard.
lhchavez b5e8272f 2019-01-06T08:29:56 Attempt at fixing the MingW64 compilation It seems like MingW64's size_t is defined differently than in Linux.
lhchavez 7b453e7e 2019-01-05T22:12:48 Fix a bunch of warnings This change fixes a bunch of warnings that were discovered by compiling with `clang -target=i386-pc-linux-gnu`. It turned out that the intrinsics were not necessarily being used in all platforms! Especially in GCC, since it does not support __has_builtin. Some more warnings were gleaned from the Windows build, but I stopped when I saw that some third-party dependencies (e.g. zlib) have warnings of their own, so we might never be able to enable -Werror there.
Etienne Samson a74f4fb9 2019-01-04T14:04:48 coverity: attempt to model clar's assertions Coverity considers that anything that looks like assert() behaves like it (ie. side-effects would be skipped on a NDEBUG build). As we have a bunch of those in the test suite (128), this would ensure Coverity isn't confused.
Etienne Samson 50d4688c 2019-01-04T13:41:50 tests: add missing asserts CID 1398597, 1398598
Etienne Samson d9eae98b 2018-10-24T01:30:12 refs: assert that we're passed valid refs when renaming CID 1382962
Etienne Samson 0a8745f2 2018-10-24T01:26:48 diff: assert that we're passed a valid git_diff object CID 1386176, 1386177, 1388219
Etienne Samson 9c23552c 2018-10-24T01:21:21 submodule: grab the error while loading from config Previously, an error in `git_config_next` would be mistaken as a successful load, because the previous call would have succeeded. Coverity saw the subsequent check for a completed iteration as dead, so let's make it useful again. CID 1391374
Etienne Samson 9f714dec 2018-08-17T18:51:56 config: assert that our parameters are valid CID 1395011
Edward Thomson fba70a9d 2019-01-03T12:02:06 Merge pull request #4919 from pks-t/pks/shutdown-cb-count Shutdown callback count
Edward Thomson 9084712b 2019-01-03T12:01:52 Merge pull request #4904 from libgit2/ethomson/crlf Update CRLF filtering to match modern git
Patrick Steinhardt b46c3594 2019-01-02T09:33:55 global: move init callbacks into an array We currently have an explicit callchain of all the initialization callbacks in our `init_common` function. This is perfectly fine, but requires us to manually keep track of how many shutdown callbacks there may be installed: to avoid allocations before libgit2 is fully initialized, we assume that every initializer may register at most one shutdown function. These shutdown functions are stored in a static array of size `MAX_SHUTDOWN_CB`, which then needs to be updated manually whenever a new initializer function is being added. The situation can be easily fixed: convert the callchain of init functions into an array and iterate over it to initialize all subsystems. This allows us to define the `git__shutdown_callbacks` array with the same size as the initializer array and rids us of the need to always update `MAX_SHUTDOWN_CB`.
Patrick Steinhardt 03dc6480 2019-01-02T09:27:44 hash: convert `global_init` macros to real function The `git_hash_global_init` function is simply defined as a macro to zero for most of the different hash implementations. This makes it impossible to treat it like a function pointer, which is required for a later commit where we want to improve the way global initialization works. Fix the issue by converting all no-op macros to an inline function returning zero. There's a small gotcha here, though: as most hash implementations only have a header file, but not a corresponding implementation file, we cannot declare the function as non-static. But declaring it as `static inline` fails, too, as there is a previous declaration as non-static. So we have to move the function declaration after the include that brings in the function definition, as it is allowed to have a non-static declaration after a static definition, but not the other way round.
Edward Thomson e385e647 2018-12-19T12:08:17 checkout::crlf: ensure success Wrap function calls in the `checkout::crlf` tests with `cl_git_pass`, `cl_assert`, etc. to ensure that they're successful.
Edward Thomson 77f1460f 2018-12-19T10:48:16 Merge pull request #4915 from pks-t/pks/refdb-minor-refactorings refdb_fs: refactor error handling in `refdb_reflog_fs__delete`
Patrick Steinhardt 8dde7e11 2018-12-19T11:04:58 refdb_fs: refactor error handling in `refdb_reflog_fs__delete` The function `refdb_reflog_fs__delete` uses the `if (!error && foobar())` pattern of checking, where error conditions are being checked by following calls to different code. This does not match our current style, where the call-site of a function is usually directly responsible for checking the return value. Convert the function to use `if ((error = foobar()) < 0) goto out;` style. Note that this changes the code flow a bit: previously, we were always trying to delete empty reference hierarchies even if deleting the reflog entry has failed. This wasn't much of a problem -- if deletion failed, the hierarchy will still contain at least one file and thus the function call was an expensive no-op. Now, we will only perform this deletion if we have successfully removed the reflog.
Patrick Steinhardt bc219657 2018-12-19T11:01:55 Merge pull request #4833 from csware/drop-empty-dirs Remove empty (sub-)directories when deleting refs
Patrick Steinhardt 8b2670b1 2018-12-19T10:34:00 Merge pull request #4910 from libgit2/cmn/annotated-from-tag Support creating annotated commits from annotated tags
Carlos Martín Nieto 6ea9381b 2018-12-14T14:43:09 annotated_commit: peel to commit instead of assuming we have one We want to allow the creation of annotated commits out of annotated tags and for that we have to peel the reference all the way to the commit instead of stopping at the first id it provides.
Carlos Martín Nieto 5bd78c48 2018-12-14T14:41:17 refs: constify git_reference_peel We have no need to take a non-const reference. This does involve some other work to make sure we don't mix const and non-const variables, but by splitting what we want each variable to do we can also simplify the logic for when we do want to free a new reference we might have allocated.
Carlos Martín Nieto 0f299365 2018-12-14T14:29:36 annotated_commit: add failing test for looking up from annotated tag
Edward Thomson da8138b0 2018-12-06T12:59:17 Merge pull request #4906 from QBobWatson/bugfix Fix segfault in loose_backend__readstream
Joe Rabinoff 2f3c4b69 2018-12-06T10:48:20 Typesetting conventions
Edward Thomson 8092c431 2018-12-05T10:01:14 Merge pull request #4905 from palmin/proxy_stream_close make proxy_stream_close close target stream even on errors
Anders Borum f4835e44 2018-12-04T21:48:12 make proxy_stream_close close target stream even on errors When git_filter_apply_fn callback returns a error while smudging proxy_stream_close ends up returning without closing the stream. This is turn makes blob_content_to_file crash as it asserts the stream being closed whether there are errors or not. Closing the target stream on error fixes this problem.
Joe Rabinoff 08afdb57 2018-12-04T10:59:25 Removed one null check
Joe Rabinoff 36f80742 2018-12-04T10:12:24 Fix segfault in loose_backend__readstream If the routine exits with error before stream or hash_ctx is initialized, the program will segfault when trying to free them.
Sven Strickroth 2a9b0102 2015-01-23T14:16:34 Additional core.autocrlf and core.safecrlf tests This is a cherry-pick of the tests from the following commits: core.autocrlf=true and core.safecrlf=true did not fail on LF-only file as vanilla git does Adding a CRLF-file with core.autocrlf=input and core.safecrlf=true does not fail as with vanilla git Make files with #CR!=#CRLF not fail with core.safecrlf=true Reported-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw> Signed-off-by: Sven Strickroth <email@cs-ware.de>
Edward Thomson ef8f8ec6 2018-12-03T13:35:30 crlf: update to match git's logic Examine the recent CRLF changes to git by Torsten Bögershausen and include similar changes to update our CRLF logic to match. Note: Torsten Bögershausen has previously agreed to allow his changes to be included in libgit2.
Edward Thomson 59b054cb 2018-12-03T13:54:32 index::crlf: better error reporting in core git tests Don't simply fail when the expected output does not match the data in the index; instead, provide a detailed output about the system, file, and settings that caused the failure so that developers can better isolate the problem(s).
Edward Thomson 021a08b0 2018-12-01T22:33:16 index::crlf: simplify test case
Sven Strickroth e417fd99 2015-07-01T17:00:16 crlf tests: use known-good data produced by git Given a variety of combinations of core.autocrlf, core.safecrlf settings and attributes settings, test that we add files to index the same way (regarding OIDs and fatal errors) as a known-good test resource created by git.git. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Edward Thomson 3d804063 2018-12-01T21:46:51 crlf_data: add corpus of known-good odb-filtered data Use the crlf data scripts to produce a corpus of known-good data in "git" format (aka ODB format) from a variety of files with different line endings. `git` created these files running `git add` to stage the contents then extracting the data from the repository. We'll use these to ensure that we create identical contents when we add files into the index.
Edward Thomson a0ab90b8 2018-12-01T21:53:07 crlf: re-use existing crlf script to create odb Re-use the existing crlf data generation script for creating the to-odb dataset. Also, store the actual file contents instead of the ID so that we can identify differences instead of detecting that differences exist.
Sven Strickroth 9065160b 2015-07-01T16:55:06 crlf: script to generate expected crlf data for adding files to index Include a shell script that will generate the expected data of OIDs and failures for calling git.git to capture its output as a test resource. Right now, there is no need to differentiate different systems as git behaves the same on all systems IIRC. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Edward Thomson c3169e6f 2018-12-01T19:59:41 checkout::crlf clear the crlf workdir for checkout After sandboxing the crlf directory, remove the working directory contents. This allows us to package data within the crlf directory (for simplicity, this allows us to script the to-odb and to-workdir crlf filter conversion data in a single location).
Edward Thomson 13a8bc92 2018-12-01T18:32:01 crlf_data: move to a "to_workdir" folder Move the crlf_data folders reponsible for holding the state of the filters going into the working directory to "to_workdir" variations of the folder name to accommodate future growth into the "to odb" filter variation. Update the script to create these new folders as appopriate.
Edward Thomson 788fccc4 2018-12-01T12:13:19 Merge pull request #4807 from libgit2/ethomson/index_fixes Index API updates for consistency
Edward Thomson 168fe39b 2018-11-28T14:26:57 object_type: use new enumeration names Use the new object_type enumeration names within the codebase.