summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test: cast to a char the zstream testEdward Thomson2019-01-251-1/+1
|
* index test: cast times explicitlyEdward Thomson2019-01-251-2/+2
| | | | Cast actual filesystem data to the int32_t that index entries store.
* Merge pull request #4858 from tiennou/fix/index-ext-readEdward Thomson2019-01-258-0/+36
|\ | | | | index: preserve extension parsing errors
| * index: preserve extension parsing errorsEtienne Samson2019-01-248-0/+36
| | | | | | | | | | | | | | Previously, we would clobber any extension-specific error message with an "extension is truncated" message. This makes `read_extension` correctly preserve those errors, takes responsibility for truncation errors, and adds a new message with the actual extension signature for unsupported mandatory extensions.
* | deprecation: define GIT_DEPRECATE_HARD internallyEdward Thomson2019-01-251-0/+2
| | | | | | | | | | Ensure that we do not use any deprecated functions in the library source, test code or examples.
* | deprecation: move deprecated tests into their own fileEdward Thomson2019-01-252-36/+60
|/ | | | | | Move the deprecated stream tests into their own compilation unit. This will allow us to disable any preprocessor directives that apply to deprecation just for these tests (eg, disabling `GIT_DEPRECATED_HARD`).
* git_error: use new names in internal APIs and usageEdward Thomson2019-01-2243-184/+184
| | | | | Move to the `git_error` name in the internal API for error-related functions.
* Fix odb foreach to also close on positive error codeMarijan Šuflaj2019-01-201-0/+15
| | | | | | | | 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.
* Merge pull request #4939 from libgit2/ethomson/git_refEdward Thomson2019-01-1914-160/+160
|\ | | | | Move `git_ref_t` to `git_reference_t`
| * references: use new names in internal usageethomson/git_refEdward Thomson2019-01-1714-160/+160
| | | | | | | | Update internal usage to use the `git_reference` names for constants.
* | Merge pull request #4940 from libgit2/ethomson/git_objEdward Thomson2019-01-192-7/+7
|\ \ | | | | | | More `git_obj` to `git_object` updates
| * | object_type: GIT_OBJECT_BAD is now GIT_OBJECT_INVALIDEdward Thomson2019-01-172-7/+7
| |/ | | | | | | | | | | | | 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`.
* | Merge pull request #4943 from libgit2/ethomson/ciEdward Thomson2019-01-192-2/+3
|\ \ | | | | | | ci: only run invasive tests in nightly
| * | ci: precisely identify the invasive testsEdward Thomson2019-01-191-1/+1
| | |
| * | tests: fix test expectation mismatchEtienne Samson2019-01-141-2/+2
| | |
| * | ci: enable some of the invasive testcasesEtienne Samson2019-01-111-0/+1
| | |
* | | Merge pull request #4925 from lhchavez/fix-a-bunch-of-warningsEdward Thomson2019-01-175-8/+10
|\ \ \ | |_|/ |/| | Fix a bunch of warnings
| * | Windows is hard.lhchavez2019-01-062-3/+3
| | |
| * | Attempt at fixing the MingW64 compilationlhchavez2019-01-063-6/+8
| | | | | | | | | | | | It seems like MingW64's size_t is defined differently than in Linux.
| * | Fix a bunch of warningslhchavez2019-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Convert tests/resources/push.sh to LF endingslhchavez2019-01-151-55/+55
| | | | | | | | | | | | | | | This changes that file to use UNIX line-endings, which makes sense since this is a UNIXy file.
* | | Get rid of some test files that were accidentally committedTyler Wanek2019-01-142151-11979/+0
| | |
* | | proxy: fix crash on remote connection with GIT_PROXY_AUTO but no proxy is ↵Jason Haslam2019-01-141-0/+7
| |/ |/| | | | | detected
* | Fix Linux warningslhchavez2019-01-081-8/+8
| | | | | | | | | | This change fixes -Wmaybe-uninitialized and -Wdeprecated-declarations warnings on Linux builds
* | tests: add missing assertsEtienne Samson2019-01-041-0/+2
|/ | | CID 1398597, 1398598
* Merge pull request #4904 from libgit2/ethomson/crlfEdward Thomson2019-01-037651-37/+33187
|\ | | | | Update CRLF filtering to match modern git
| * checkout::crlf: ensure successethomson/crlfEdward Thomson2018-12-191-30/+33
| | | | | | | | | | Wrap function calls in the `checkout::crlf` tests with `cl_git_pass`, `cl_assert`, etc. to ensure that they're successful.
| * Additional core.autocrlf and core.safecrlf testsSven Strickroth2018-12-032-3/+52
| | | | | | | | | | | | | | | | | | | | | | 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>
| * index::crlf: better error reporting in core git testsEdward Thomson2018-12-031-8/+25
| | | | | | | | | | | | | | 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).
| * index::crlf: simplify test caseEdward Thomson2018-12-031-60/+42
| |
| * crlf tests: use known-good data produced by gitSven Strickroth2018-12-031-1/+206
| | | | | | | | | | | | | | | | | | 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>
| * crlf_data: add corpus of known-good odb-filtered dataEdward Thomson2018-12-036257-0/+32690
| | | | | | | | | | | | | | | | | | | | 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.
| * crlf: re-use existing crlf script to create odbEdward Thomson2018-12-0322-118/+63
| | | | | | | | | | | | 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.
| * crlf: script to generate expected crlf data for adding files to indexSven Strickroth2018-12-0322-3/+232
| | | | | | | | | | | | | | | | | | | | 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>
| * checkout::crlf clear the crlf workdir for checkoutEdward Thomson2018-12-031-0/+24
| | | | | | | | | | | | | | 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).
| * crlf_data: move to a "to_workdir" folderEdward Thomson2018-12-031371-5/+11
| | | | | | | | | | | | | | 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.
* | Merge pull request #4833 from csware/drop-empty-dirsPatrick Steinhardt2018-12-191-0/+46
|\ \ | | | | | | Remove empty (sub-)directories when deleting refs
| * | Remove empty directories when deleting refsSven Strickroth2018-10-131-0/+46
| | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | annotated_commit: add failing test for looking up from annotated tagCarlos Martín Nieto2018-12-141-0/+26
| |/ |/|
* | object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-0175-417/+420
| | | | | | | | Use the new object_type enumeration names within the codebase.
* | index: use new enum and structure namesEdward Thomson2018-12-0120-96/+96
| | | | | | | | Use the new-style index names throughout our own codebase.
* | Merge pull request #4770 from tiennou/feature/merge-analysis-any-branchPatrick Steinhardt2018-11-301-20/+49
|\ \ | | | | | | Allow merge analysis against any reference
| * | merge: make analysis possible against a non-HEAD referenceEtienne Samson2018-10-191-20/+49
| | | | | | | | | | | | | | | | | | | | | This moves the current merge analysis code into a more generic version that can work against any reference. Also change the tests to check returned analysis values exactly.
* | | Merge pull request #4888 from TheBB/add-cbPatrick Steinhardt2018-11-291-2/+29
|\ \ \ | | | | | | | | revwalk: Allow changing hide_cb
| * | | revwalk: Allow changing hide_cbEivind Fonn2018-11-281-2/+29
| | | | | | | | | | | | | | | | | | | | Since git_revwalk objects are encouraged to be reused, a public interface for changing hide_cb is desirable.
* | | | Merge pull request #4895 from pks-t/pks/unused-warningsPatrick Steinhardt2018-11-298-160/+172
|\ \ \ \ | | | | | | | | | | Unused function warnings
| * | | | tests: mailmap: avoid definition of unused static variablesPatrick Steinhardt2018-11-282-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mailmap testdata header contains a set of static variable definitions. As these variables aren't used in all places where they are used, they trigger the unused-const-variable warnings. As we have currently disabled those warnings explicitly, they are never triggered, but we intend to enable them. Avoid the issue by only keeping variable definitions that are actually used in all locations. Move the others to where they are used.
| * | | | khash: remove intricate knowledge of khash typesPatrick Steinhardt2018-11-283-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the `khiter_t`, `git_strmap_iter` and `khint_t` types, simply use `size_t` instead. This decouples code from the khash stuff and makes it possible to move the khash includes into the implementation files.
| * | | | tests: path: only compile test_canonicalize on Win32 platformsPatrick Steinhardt2018-11-281-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function `test_canonicalize` is only used on Win32 platforms. It will thus result in an unused function warning if these warnings are enabled and one is on a platform different than Win32. Fix the issue by only compiling in the function on Win32 platforms.
| * | | | tests: move apply_helpers functions into own compilation unitPatrick Steinhardt2018-11-282-126/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the "apply_helper" functions used for testing the apply logic are all statically defined in the "apply_helpers.h" header file. This may lead to warnings from the compiler in case where this header file is included, but not all functions it brings along are used in the compilation unit where it has been included into. Fix these potential warnings by moving the implementation into its own compilation unit "apply_helpers.c".