tests


Log

Author Commit Date CI Message
Edward Thomson 62602547 2015-12-26T22:39:22 git_repository_init: include dotfiles when copying templates Include dotfiles when copying template directory, which will handle both a template directory itself that begins with a dotfile, and any dotfiles inside the directory.
Edward Thomson 00282183 2015-12-26T22:32:17 repo::init tests: test a template dir with leading dot Ensure that we can handle template directories that begin with a leading dot.
Edward Thomson 5c042c5b 2015-12-26T22:06:45 repo::init tests: test init.templatedir setting Ensure that `git_repository_init` honors the `init.templatedir` configuration setting.
Dmitriy Olshevskiy 91f0d186 2015-12-21T20:49:14 typos in comments
Vicent Marti 5951445f 2015-12-17T10:13:04 commit: Fix memory leak in test suite
Edward Thomson 30c8e260 2015-12-14T13:53:26 Merge pull request #3521 from pks-t/blame-line-overflow Line count overflow in git_blame_hunk and git_blame__entry
Carlos Martín Nieto 6aa06b65 2015-12-10T12:14:09 Merge pull request #3522 from pks-t/email-format-commit-message diff: include commit message when formatting patch
Carlos Martín Nieto 465c3b38 2015-12-09T19:16:11 reset: perform the checkout before moving HEAD or the index This keeps the state of the workdir the same as one from HEAD, removing a source of possible confusion when calculating the work that is to be done.
Michał Górny 326c9fc2 2015-12-01T20:41:23 checkout test: Apply umask to file-mode test as well Fix the file-mode test to expect system umask being applied to the created file as well (it is currently applied to the directory only). This fixes the test on systems where umask != 022. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Patrick Steinhardt 254e0a33 2015-11-24T13:43:43 diff: include commit message when formatting patch When formatting a patch as email we do not include the commit's message in the formatted patch output. Implement this and add a test that verifies behavior.
Patrick Steinhardt 7f8fe1d4 2015-12-01T10:03:56 commit: introduce `git_commit_body` It is already possible to get a commit's summary with the `git_commit_summary` function. It is not possible to get the remaining part of the commit message, that is the commit message's body. Fix this by introducing a new function `git_commit_body`.
Patrick Steinhardt cb1cb24c 2015-11-24T10:18:58 blame: use size_t for line counts in git_blame_hunk It is not unreasonable to have versioned files with a line count exceeding 2^16. Upon blaming such files we fail to correctly keep track of the lines as `git_blame_hunk` stores them in `uint16_t` fields. Fix this by converting the line fields of `git_blame_hunk` to `size_t`. Add test to verify behavior.
Patrick Steinhardt a7bd157e 2015-11-30T17:40:49 tests: fix warning for nested struct initialization
Carlos Martín Nieto a27f31d8 2015-11-30T04:49:31 Merge pull request #3513 from ethomson/merge_recursive Recursive Merge
Edward Thomson 5b9c63c3 2015-11-20T19:01:42 recursive merge: add a recursion limit
Edward Thomson 78859c63 2015-11-20T17:33:49 merge: handle conflicts in recursive base building When building a recursive merge base, allow conflicts to occur. Use the file (with conflict markers) as the common ancestor. The user has already seen and dealt with this conflict by virtue of having a criss-cross merge. If they resolved this conflict identically in both branches, then there will be no conflict in the result. This is the best case scenario. If they did not resolve the conflict identically in the two branches, then we will generate a new conflict. If the user is simply using standard conflict output then the results will be fairly sensible. But if the user is using a mergetool or using diff3 output, then the common ancestor will be a conflict file (itself with diff3 output, haha!). This is quite terrible, but it matches git's behavior.
Edward Thomson 34a51428 2015-11-09T11:55:26 merge tests: add complex recursive example
Edward Thomson 651bfd69 2015-11-09T08:24:47 recursive: test conflict output during recursive merge
Edward Thomson dcde5720 2015-11-09T08:23:27 merge tests: move expected data into own file
Edward Thomson b1eef912 2015-10-27T18:00:30 merge: add recursive test with conflicting contents
Edward Thomson fccad82e 2015-10-27T14:23:35 merge: add recursive test with three merge bases
Edward Thomson 99d9d9a4 2015-10-26T17:44:36 merge: improve test names in recursive merge tests
Edward Thomson a200bcf7 2015-10-26T17:25:42 merge: add a third-level recursive merge
Edward Thomson cdb6c1c8 2015-10-26T17:14:28 merge: add a second-level recursive merge
Edward Thomson 86c8d02c 2015-10-22T20:20:07 merge: add simple recursive test Add a simple recursive test - where multiple ancestors exist and creating a virtual merge base from them would prevent a conflict.
Edward Thomson fa78782f 2015-10-22T17:00:09 merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`
Patrick Steinhardt 77b79dde 2015-11-24T14:36:46 tests: win32::longpath: free expected_msg
Patrick Steinhardt 9031be18 2015-11-24T14:38:17 tests: config::stress: free `git_config` structs
Patrick Steinhardt c8fab201 2015-11-24T14:29:32 tests: config::global: fix memleak in open_programdata
Edward Thomson c4f60543 2015-11-20T17:57:04 Merge pull request #3517 from jacquesg/warnings-fixes Fix some warnings
Jacques Germishuys 87428c55 2015-11-20T20:48:51 Fix some warnings
Carlos Martín Nieto 2ea40fda 2015-11-20T13:19:23 repository: distinguish sequencer cherry-pick and revert These are not quite like their plain counterparts and require special handling.
Carlos Martín Nieto 69d14948 2015-11-17T13:21:18 Merge pull request #3511 from ethomson/racy_fixes_2 Racy fixes for writing new indexes
Edward Thomson 88638f9b 2015-11-17T11:22:01 tests: use out-of-the-way config dir in sandbox Don't put the configuration in a subdir of the sandbox named `config`, lest some tests decide to create their own directory called `config`. Prefix with some underscores for uniqueness.
Edward Thomson fe963748 2015-11-16T23:34:26 tests: set PROGRAMDATA directory for running tests
Edward Thomson 6f7c4118 2015-11-17T08:38:46 config::global: use PROGRAMDATA configuration Query the `GIT_CONFIG_LEVEL_PROGRAMDATA` location when setting it up for tests, in case the test runner has sandboxed it.
Edward Thomson 5f32c506 2015-11-16T18:06:52 racy: make git_index_read_index handle raciness Ensure that `git_index_read_index` clears the uptodate bit on files that it modifies. Further, do not propagate the cache from an on-disk index into another on-disk index. Although this should not be done, as `git_index_read_index` is used to bring an in-memory index into another index (that may or may not be on-disk), ensure that we do not accidentally bring in these bits when misused.
Edward Thomson c30051f0 2015-11-16T18:05:46 racy: ensure git_index_read_tree clears uptodate Ensure that `git_index_read_tree` clears the uptodate bit on files that it modifies.
Edward Thomson 956f4da8 2015-11-13T16:30:39 index: test for smudged entries on write only Test that entries are only smudged when we write the index: the entry smudging is to prevent us from updating an index in a way that it would be impossible to tell that an item was racy. Consider when we load an index: any entries that have the same (or newer) timestamp than the index itself are considered racy, and are subject to further scrutiny. If we *save* that index with the same entries that we loaded, then the index would now have a newer timestamp than the entries, and they would no longer be given that additional scrutiny, failing our racy detection! So test that we smudge those entries only on writing the new index, but that we can detect them (in diff) without having to write.
Edward Thomson de999f26 2015-11-13T15:36:45 checkout::crlf test: don't crash when no idx entry When there's no matching index entry (for whatever reason), don't try to dereference the null return value to get at the id. Otherwise when we break something in the index API, the checkout test crashes for confusing reasons and causes us to step through it in a debugger thinking that we had broken much more than we actually did.
Edward Thomson d1101263 2015-11-13T15:32:48 index: don't detect raciness in uptodate entries Keep track of entries that we believe are up-to-date, because we added the index entries since the index was loaded. This prevents us from unnecessarily examining files that we wrote during the cleanup of racy entries (when we smudge racily clean files that have a timestamp newer than or equal to the index's timestamp when we read it). Without keeping track of this, we would examine every file that we just checked out for raciness, since all their timestamps would be newer than the index's timestamp.
Vicent Marti 7ff7ca62 2015-11-12T20:51:01 pool: Never return unaligned buffers
Carlos Martín Nieto 75a0ccf5 2015-11-12T19:53:09 Merge pull request #3170 from CmdrMoozy/nsec_fix git_index_entry__init_from_stat: set nsec fields in entry stats
Carlos Martín Nieto 2c26c867 2015-11-12T19:22:31 Merge pull request #3499 from ethomson/ref_dir_errmsgs Improve error messages when dirs prevent ref/reflog creation
Carlos Martín Nieto ecdc0428 2015-11-12T19:20:36 Merge pull request #3448 from libgit2/cmn/custom-agent Support setting custom user-agent
Carlos Martín Nieto de870533 2015-10-02T03:43:11 settings: add a setter for a custom user-agent
Edward Thomson 0a700ee3 2015-11-03T17:34:54 reflog: error when a directory is at reflog path When a non-empty directory exists and prevents the creation of a reflog, provide a more informative error message.
Edward Thomson b46c7ee5 2015-11-03T17:18:00 refs: complain when a directory exists at ref When a (non-empty) directory exists at the reference target location, complain with a more actionable error message.
nulltoken 1314af8d 2014-08-26T13:51:37 Failing test for case sensitive conflicts in the index
Carlos Martín Nieto 1c34b717 2015-11-08T05:10:18 Merge pull request #3498 from ethomson/windows_symlinks Diff: Honor `core.symlinks=false` and fake symlinks
Carlos Martín Nieto 61948894 2015-11-08T04:54:55 Merge pull request #3500 from ethomson/submodules_with_path Handle submodules with paths in `git_submodule_update`
Edward Thomson 790012ce 2015-11-04T16:16:51 submodule: test updating a submodule w/ a path Test that `git_submodule_update` can handle a submodule that is freshly cloned and has a path differing from its name.
Edward Thomson 5aa28a8f 2015-11-04T14:16:24 Merge pull request #3465 from libgit2/cmn/tls-register stream: allow registering a user-provided TLS constructor
Stjepan Rajko f5f96a23 2015-10-09T10:41:06 Fix git_commit_summary to convert newlines to spaces even after whitespace. Collapse spaces around newlines for the summary.
Edward Thomson ec50b23a 2015-11-03T17:02:07 filebuf: detect directories in our way When creating a filebuf, detect a directory that exists in our target file location. This prevents a failure later, when we try to move the lock file to the destination.
Edward Thomson 2d556f31 2015-11-03T14:48:31 reflog: test reflog is deleted when ref is deleted
Edward Thomson 6cc5023b 2015-11-03T11:27:31 index: test that add_bypath preserves symlinks Test that on platforms without `core.symlinks`, we preserve symlinks in `git_index_add_bypath`. (Users should correct the actual index entry's mode to change a link to a regular file.)
Edward Thomson f20480ab 2015-11-03T09:40:30 diff: test "symlinks" in wd are respected on win32 When `core.symlinks = false`, we write the symlinks content (target) to a regular file. We should ensure that when we later see that regular file, we treat it specially - and that changing that regular file would actually change the symlink target. (For compatibility with Git for Windows).
Carlos Martín Nieto 3ce6cd4b 2015-11-03T08:13:41 Merge pull request #3494 from leoyanggit/fix_unit_test_build Fix build for unit test
Carlos Martín Nieto 7fafde63 2015-10-13T11:25:41 stream: allow registering a user-provided TLS constructor This allows the application to use their own TLS stream, regardless of the capabilities of libgit2 itself.
Jason Haslam 3138ad93 2015-07-16T10:17:16 Add diff progress callback.
Leo Yang 505e4531 2015-10-30T13:53:53 Fix build for unit test If none of GIT_OPENSSL, GIT_WINHTTP or GIT_SECURE_TRANSPORT is defined we should also be able to build the unit test.
Edward Thomson db1edf91 2015-11-02T15:09:19 Merge pull request #3491 from libgit2/cmn/config-checksum Use checksums to detect config file changes
Vicent Marti b656e5eb 2015-11-02T12:06:50 merge: Fix memory leak in test
Vicent Marti 85196232 2015-10-30T18:32:34 Add test case
Carlos Martín Nieto a2f96479 2015-10-29T20:31:25 config: add failing test for an external modification We currently use the timestamp in order to decide whether a config file has changed since we last read it. This scheme falls down if the file is written twice within the same second, as we fail to detect the file change after the first read in that second.
Carlos Martín Nieto fd74bd08 2015-10-29T20:37:48 Merge pull request #3486 from srajko/reflog-segfault-fix Fix segfault when reading reflog with extra newlines
Stjepan Rajko 335c9e2f 2015-10-26T15:33:00 Prevent segfault when parsing a reflog with oid parse error Using calloc instead of malloc because the parse error will lead to an immediate free of committer (and its properties, which can segfault on free if undefined - test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error segfaulted before the fix). #3458
Vicent Marti 66eb7660 2015-10-28T10:29:00 pool: Handle 32 bit systems
Vicent Marti 1e5e02b4 2015-10-27T17:26:04 pool: Simplify implementation
Edward Thomson 8683d31f 2015-10-22T14:39:20 merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which will stop on the first conflict and fail the merge operation with GIT_EMERGECONFLICT.
Carlos Martín Nieto dc2cf3eb 2015-10-22T18:35:43 Merge pull request #3480 from ethomson/nsecs Nanoseconds in the index: ignore for diffing
Edward Thomson 99a09f7f 2015-10-22T09:29:40 index: test that we round-trip nsecs Test that nanoseconds are round-tripped correctly when we read an index file that contains them. We should, however, ignore them because we don't understand them, and any new entries in the index should contain a `0` nsecs field, while existing preserving entries.
Edward Thomson 44b1e3e3 2015-10-21T13:43:22 Merge pull request #3475 from libgit2/cmn/programdata-config config: add a ProgramData level
Carlos Martín Nieto 8c7c5fa5 2015-10-20T17:42:42 config: add a ProgramData level This is where portable git stores the global configuration which we can use to adhere to it even though git isn't quite installed on the system.
Vicent Marti bbe1957b 2015-10-21T12:09:29 tests: Fix warnings
Vicent Marti 307c4a2b 2015-10-21T11:58:44 signature: Strip crud just like Git does
Edward Thomson 4280fabb 2015-10-15T07:10:48 Merge pull request #3466 from libgit2/cmn/quick-parse-64 revwalk: make commit list use 64 bits for time
Carlos Martín Nieto 8321596a 2015-10-15T12:22:10 Merge pull request #3444 from ethomson/add_preserves_conflict_mode Preserve modes from a conflict in `git_index_insert`
Vicent Marti a0a1b19a 2015-10-14T19:31:54 odb: Prioritize alternate backends For most real use cases, repositories with alternates use them as main object storage. Checking the alternate for objects before the main repository should result in measurable speedups. Because of this, we're changing the sorting algorithm to prioritize alternates *in cases where two backends have the same priority*. This means that the pack backend for the alternate will be checked before the pack backend for the main repository *but* both of them will be checked before any loose backends.
Carlos Martín Nieto 5ffdea6f 2015-10-14T16:49:01 revwalk: make commit list use 64 bits for time We moved the "main" parsing to use 64 bits for the timestamp, but the quick parsing for the revwalk did not. This means that for large timestamps we fail to parse the time and thus the walk. Move this parser to use 64 bits as well.
Edward Thomson 6c014bcc 2015-09-29T12:18:17 diff: don't feed large files to xdiff
Edward Thomson e4352066 2015-09-28T18:25:24 merge_file: treat large files as binary xdiff craps the bed on large files. Treat very large files as binary, so that it doesn't even have to try. Refactor our merge binary handling to better match git.git, which looks for a NUL in the first 8000 bytes.
Axel Rasmussen c7b17fb5 2015-10-01T18:01:32 Merge branch 'master' into nsec_fix_next
Arthur Schreiber d3b29fb9 2015-10-01T00:50:37 refdb and odb backends must provide `free` function As refdb and odb backends can be allocated by client code, libgit2 can’t know whether an alternative memory allocator was used, and thus should not try to call `git__free` on those objects. Instead, odb and refdb backend implementations must always provide their own `free` functions to ensure memory gets freed correctly.
Edward Thomson 21515f22 2015-09-29T15:49:16 index: also try conflict mode when inserting When we do not trust the on-disk mode, we use the mode of an existing index entry. This allows us to preserve executable bits on platforms that do not honor them on the filesystem. If there is no stage 0 index entry, also look at conflicts to attempt to answer this question: prefer the data from the 'ours' side, then the 'theirs' side before falling back to the common ancestor.
Carlos Martín Nieto 72b7c570 2015-09-30T09:17:18 Merge pull request #3411 from spraints/custom-push-headers Include custom HTTP headers
Edward Thomson 10df661b 2015-09-29T14:16:51 index: test that add_bypath preserves mode
Edward Thomson ea467e74 2015-09-28T16:46:09 win32::longpath: don't print path
Edward Thomson fc3ef147 2015-09-28T06:41:00 Merge pull request #3441 from libgit2/cmn/badssl net: add tests against badssl.com
Carlos Martín Nieto 5c5df666 2015-09-27T23:32:20 Plug some leaks
Carlos Martín Nieto 53a28705 2015-09-27T22:48:39 net: add tests against badssl.com These provide bad X.509 certificates, which we should refuse to connect to by default.
Guille -bisho- e4b2b919 2015-09-25T10:37:41 Fix binary diffs git expects an empty line after the binary data: literal X ...binary data... <empty_line> The last literal block of the generated patches were not containing the required empty line. Example: diff --git a/binary_file b/binary_file index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 6 Nc${NM%g@i}0ssZ|0lokL diff --git a/binary_file2 b/binary_file2 index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 13 Sc${NMEKbZyOexL+Qd|HZV+4u- git apply of that diff results in: error: corrupt binary patch at line 9: diff --git a/binary_file2 b/binary_file2 fatal: patch with only garbage at line 10 The proper formating is: diff --git a/binary_file b/binary_file index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 6 Nc${NM%g@i}0ssZ|0lokL diff --git a/binary_file2 b/binary_file2 index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 13 Sc${NMEKbZyOexL+Qd|HZV+4u-
Edward Thomson 9768ebb1 2015-09-22T23:24:30 win32: test checkout msg on long path err
Carlos Martín Nieto aebddbe7 2015-09-21T06:01:03 Merge pull request #3434 from ethomson/reservednames Win32 Reserved names: don't reserve names outside the working directory
Axel Rasmussen 0226f7dd 2015-08-29T13:59:20 diff/index: respect USE_NSEC for racily clean file detection
Axel Rasmussen e9e6df2c 2015-06-15T09:28:55 cmake: Only provide USE_NSEC if struct stat members are avilable. This allows us to remove OS checks from source code, instead relying on CMake to detect whether or not `struct stat` has the nanoseconds members we rely on.
Axel Rasmussen 2be78557 2015-06-02T12:45:30 caps: add test for GIT_FEATURES_NSEC
Axel Rasmussen e7de893e 2015-06-01T13:43:54 cmake: add USE_NSEC, and only check nanosec m/ctime if enabled
Edward Thomson e8ddd8d7 2015-09-17T17:49:32 repo::reservedname: test a submodule update Test an initial submodule update, where we are trying to checkout the submodule for the first time, and placing a file within the submodule working directory with the same name as the submodule (and consequently, the same name as the repository itself).