summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* online: test with https instead of git protocolethomson/test_httpsEdward Thomson2022-01-104-46/+37
| | | | | GitHub is removing support for the unauthenticated git protocol; test with the https protocol.
* status: don't use `// ...` in tests, use `/* ... */`Edward Thomson2022-01-061-5/+4
|
* Merge remote-tracking branch 'pr/6159'Edward Thomson2022-01-065-0/+64
|\
| * #6154 git_status_list_new case insensitive fixMiguel Arroz2022-01-015-0/+63
| |
* | status: don't use `// ...` in tests, use `/* ... */`Edward Thomson2022-01-061-15/+15
| |
* | Merge pull request #6165 from libgit2/ethomson/includeifEdward Thomson2022-01-061-0/+25
|\ \ | | | | | | config: handle empty conditional in includeIf
| * | config: handle empty conditional in includeIfEdward Thomson2022-01-051-0/+25
| |/ | | | | | | | | | | When a config file contains `[includeIf]` (with no condition), we should treat that as a falsey value. This means that we should properly parse a config value of `includeIf.path`.
* | Add `rename_threshold` to `git_status_options`.Miguel Arroz2021-12-311-0/+63
|/
* worktree: checkout options suggestions from code reviewEdward Thomson2021-12-231-1/+1
|
* Fix test fail because of memory leakpunkymaniac2021-12-231-0/+1
|
* Update test for `git_str` usage instead of `git_buf`punkymaniac2021-12-231-3/+3
| | | | See commit f0e693b18afbe1de37d7da5b5a8967b6c87d8e53
* Add test for `git_worktree_add` no checkoutpunkymaniac2021-12-231-0/+21
|
* Merge pull request #6142 from libgit2/ethomson/blob_data_is_binaryEdward Thomson2021-12-231-0/+16
|\ | | | | blob: identify binary content
| * blob: identify binary contentethomson/blob_data_is_binaryEdward Thomson2021-12-101-0/+16
| | | | | | | | | | Introduce `git_blob_data_is_binary` to examine a blob's data, instead of the blob itself. A replacement for `git_buf_is_binary`.
* | Merge pull request #6124 from csware/config-parsingEdward Thomson2021-12-233-0/+57
|\ \ | | | | | | Config parsing
| * | Multiline config values not preserved on savingSven Strickroth2021-12-061-0/+19
| | | | | | | | | | | | | | | | | | (fixes issue #6088) Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * | Add more tests for contentsSven Strickroth2021-12-061-0/+15
| | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * | Config parsing confused by continuations that start with quotesSven Strickroth2021-12-062-0/+23
| | | | | | | | | | | | | | | | | | (fixes issue #6089) Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | Merge pull request #6125 from stforek/git_commit_summary_spacesEdward Thomson2021-12-231-0/+3
|\ \ \ | | | | | | | | git_commit_summary: ignore lines with spaces
| * | | git_commit_summary: ignore lines with spacesPrzemyslaw Ciezkowski2021-11-251-0/+3
| |/ / | | | | | | | | | Fixes libgit2/libgit2#6065
* | | Merge pull request #6101 from mkhl/fix/instead-ofEdward Thomson2021-12-232-23/+128
|\ \ \ | | | | | | | | remotes: fix insteadOf/pushInsteadOf handling
| * | | update remote/insteadof testsMartin Kühl2021-11-112-23/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we want to test: - an anonymous repo (a url) - a named repo with a url - a named repo with a url and pushurl and for each of these matching configuration: - only insteadOf - only pushInsteadOf - both insteadOf and pushInsteadOf this change adds test cases for all of these combinations.
* | | | Merge pull request #6095 from yoichi/better-compatiblity-for-at-time-notationEdward Thomson2021-12-2310-26/+56
|\ \ \ \ | | | | | | | | | | Better revparse compatibility for at time notation
| * \ \ \ Merge branch 'main' into better-compatiblity-for-at-time-notationYoichi Nakayama2021-11-23123-1086/+1807
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | Conflicts: src/revparse.c
| * | | | Cause error when date parsing is failedYoichi Nakayama2021-10-222-0/+20
| | | | |
| * | | | Return the oldest reflog entry on revparse when older time is givenYoichi Nakayama2021-10-221-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | For better compatibility with git command which returns the oldest log entry with a warning message.
| * | | | Add a branch with a empty reflog into testrepo.gitYoichi Nakayama2021-10-228-21/+24
| | | | |
* | | | | cmake: use PROJECT_SOURCE_DIR of CMAKE_SOURCE_DIRJosh Junon2021-12-231-3/+3
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also applies to *_BINARY_DIR. This effectively reverts 84083dcc8bd41332ccac9d7b537f3e254d79011c, which broke all users of libgit2 that use it as a CMake subdirectory (via `add_subdirectory()`). This is because CMAKE_SOURCE_DIR refers to the root-most CMake directory, which in the case of `add_subdirectory()` is a parent project to libgit2 and thus the paths don't make any sense to the configuration files. Corollary, CMAKE_SOURCE_DIR only makes sense if the CMake project is always the root project - which can rarely be guaranteed. In all honesty, CMake should deprecate and eventually remove CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR. It's been the source of headaches and confusion for years, they're rarely useful over CMAKE_CURRENT_(SOURCE|BINARY)_DIR or PROJECT_(SOURCE|BINARY)_DIR, and they cause a lot of confusing configuration and source code layouts to boot. Any time they are used, they break `add_subdirectory()` almost 100% of the time, cause confusing error messages, and hide subtle bugs.
* | | | object: introduce a raw content validation functionethomson/object_validationEdward Thomson2021-11-301-0/+50
| | | | | | | | | | | | | | | | | | | | Users may want to validate raw object content; provide them a function to do so.
* | | | Merge pull request #6122 from libgit2/ethomson/cleanupEdward Thomson2021-11-309-20/+21
|\ \ \ \ | |_|/ / |/| | | Minor code cleanups
| * | | cmake: use CMAKE_SOURCE_DIR and CMAKE_BINARY_DIRethomson/cleanupEdward Thomson2021-11-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using the project-specific `libgit2_SOURCE_DIR` and `libgit2_BINARY_DIR` variables, use `CMAKE_SOURCE_DIR` and `CMAKE_BINARY_DIR`.
| * | | sha1: tests should use hashes, not oid computationEdward Thomson2021-11-221-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | The tests that examine sha1 behavior (including collision detection) should test against the hash functionality directly, not indirectly using the oid functions.
| * | | util: don't include unnecessary system librariesEdward Thomson2021-11-226-6/+0
| | | | | | | | | | | | | | | | Remove some unnecessary includes from utility code.
| * | | utf8: include `utf8.h` in testsEdward Thomson2021-11-191-0/+1
| | | |
* | | | Merge pull request #6106 from ammgws/fixtemplateerrEdward Thomson2021-11-221-0/+10
|\ \ \ \ | |/ / / |/| | | Fix repo init when template dir is non-existent
| * | | tests: try to init with non-existent template pathJason Nader2021-11-121-0/+10
| | | |
* | | | date: rfc2822 formatting uses a `git_buf` instead of a static stringethomson/dateEdward Thomson2021-11-191-17/+14
| | | |
* | | | date: make it a proper `git_date` utility classEdward Thomson2021-11-182-8/+8
| | | | | | | | | | | | | | | | Instead of `git__date`, just use `git_date`.
* | | | cmake: enable testing at the top levelEdward Thomson2021-11-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that we `enable_testing()` at the top-level CMakeLists.txt or else we'll need to navigate within the build directory to the correct place in the hierarchy to run `ctest`. Now we can `ctest` at the top-level again.
* | | | cmake: better explain why headertests existsEdward Thomson2021-11-161-3/+8
| | | |
* | | | Make enum in src,tests and examples C90 compliant by removing trailing comma.Peter Pettersson2021-11-151-3/+3
| | | |
* | | | Add target for testing libgit2 headersPeter Pettersson2021-11-152-1/+26
| | | |
* | | | cmake: refactor global variablesEdward Thomson2021-11-141-7/+5
| | | | | | | | | | | | | | | | | | | | Update the global variables `LIBGIT2_OBJECTS` to `LIBGIT2_DEPENDENCY_OBJECTS` for clarity and consistency.
* | | | tests: include function declarationsEdward Thomson2021-11-115-4/+13
| | | |
* | | | test: correct test namesEdward Thomson2021-11-113-3/+3
| | | |
* | | | tests: declare functions statically where appropriateEdward Thomson2021-11-1134-60/+442
| | | |
* | | | clar: declare summary functions as staticEdward Thomson2021-11-111-5/+5
| | | |
* | | | tests: declare trace handler as staticEdward Thomson2021-11-111-1/+1
| | | |
* | | | tests: include test declarations for old gccEdward Thomson2021-11-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Older versions of gcc do not believe that we've adequately declared our test functions. Include `clar_suite.h` conditionally for those old versions. Do not do this on newer compilers to avoid unnecessary recompilation of the entire suite when we add or remove a test function.
* | | | clar: emit `clar_suite.h` with test declarationsEdward Thomson2021-11-111-13/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We may want to have test function declarations; produce a header file with (only) the test declarations. Update clar to avoid overwriting the file unnecessarily to avoid bumping timestamps and potentially recompiling unnecessarily.