summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | reflog: error when a directory is at reflog pathEdward Thomson2015-11-121-0/+53
| | | | | | | | | | | | | | | | | | | | When a non-empty directory exists and prevents the creation of a reflog, provide a more informative error message.
| * | | refs: complain when a directory exists at refEdward Thomson2015-11-121-0/+17
| | | | | | | | | | | | | | | | | | | | When a (non-empty) directory exists at the reference target location, complain with a more actionable error message.
| * | | filebuf: detect directories in our wayEdward Thomson2015-11-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | reflog: test reflog is deleted when ref is deletedEdward Thomson2015-11-031-0/+18
| | | |
* | | | Merge pull request #3448 from libgit2/cmn/custom-agentCarlos Martín Nieto2015-11-121-0/+11
|\ \ \ \ | | | | | | | | | | Support setting custom user-agent
| * | | | settings: add a setter for a custom user-agentCarlos Martín Nieto2015-11-121-0/+11
| | | | |
* | | | | Failing test for case sensitive conflicts in the indexnulltoken2015-11-121-0/+91
|/ / / /
* | | | Merge pull request #3498 from ethomson/windows_symlinksCarlos Martín Nieto2015-11-082-0/+90
|\ \ \ \ | | | | | | | | | | Diff: Honor `core.symlinks=false` and fake symlinks
| * | | | index: test that add_bypath preserves symlinksEdward Thomson2015-11-031-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * | | | diff: test "symlinks" in wd are respected on win32Edward Thomson2015-11-031-0/+61
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | | Merge pull request #3500 from ethomson/submodules_with_pathCarlos Martín Nieto2015-11-0815-0/+77
|\ \ \ \ | | | | | | | | | | Handle submodules with paths in `git_submodule_update`
| * | | | submodule: test updating a submodule w/ a pathEdward Thomson2015-11-0415-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | Test that `git_submodule_update` can handle a submodule that is freshly cloned and has a path differing from its name.
* | | | | Merge pull request #3465 from libgit2/cmn/tls-registerEdward Thomson2015-11-041-0/+47
|\ \ \ \ \ | |/ / / / |/| | | | stream: allow registering a user-provided TLS constructor
| * | | | stream: allow registering a user-provided TLS constructorcmn/tls-registerCarlos Martín Nieto2015-11-031-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | This allows the application to use their own TLS stream, regardless of the capabilities of libgit2 itself.
* | | | | Fix git_commit_summary to convert newlines to spaces even afterStjepan Rajko2015-11-032-3/+7
| | | | | | | | | | | | | | | | | | | | whitespace. Collapse spaces around newlines for the summary.
* | | | | Merge pull request #3494 from leoyanggit/fix_unit_test_buildCarlos Martín Nieto2015-11-031-2/+13
|\ \ \ \ \ | |/ / / / |/| | | | Fix build for unit test
| * | | | Fix build for unit testLeo Yang2015-11-021-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | If none of GIT_OPENSSL, GIT_WINHTTP or GIT_SECURE_TRANSPORT is defined we should also be able to build the unit test.
* | | | | Add diff progress callback.Jason Haslam2015-11-022-2/+29
| |/ / / |/| | |
* | | | Merge pull request #3491 from libgit2/cmn/config-checksumEdward Thomson2015-11-021-0/+20
|\ \ \ \ | | | | | | | | | | Use checksums to detect config file changes
| * | | | config: add failing test for an external modificationCarlos Martín Nieto2015-10-301-0/+20
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | merge: Fix memory leak in testvmg/redundantVicent Marti2015-11-021-0/+1
| | | |
* | | | Add test caseVicent Marti2015-11-028-0/+30
|/ / /
* | | Merge pull request #3486 from srajko/reflog-segfault-fixCarlos Martín Nieto2015-10-291-0/+43
|\ \ \ | | | | | | | | Fix segfault when reading reflog with extra newlines
| * | | Prevent segfault when parsing a reflog with oid parse errorStjepan Rajko2015-10-291-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | pool: Handle 32 bit systemsVicent Marti2015-10-281-1/+1
| | | |
* | | | pool: Simplify implementationVicent Marti2015-10-281-71/+11
|/ / /
* | | merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICTEdward Thomson2015-10-222-5/+22
| | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #3480 from ethomson/nsecsCarlos Martín Nieto2015-10-2213-0/+93
|\ \ \ | | | | | | | | Nanoseconds in the index: ignore for diffing
| * | | index: test that we round-trip nsecsEdward Thomson2015-10-2213-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #3475 from libgit2/cmn/programdata-configEdward Thomson2015-10-211-0/+40
|\ \ \ \ | |/ / / |/| | | config: add a ProgramData level
| * | | config: add a ProgramData levelcmn/programdata-configCarlos Martín Nieto2015-10-211-0/+40
| | | | | | | | | | | | | | | | | | | | 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.
* | | | tests: Fix warningsvmg/crudVicent Marti2015-10-212-2/+3
| | | |
* | | | signature: Strip crud just like Git doesVicent Marti2015-10-212-1/+8
|/ / /
* | | Merge pull request #3466 from libgit2/cmn/quick-parse-64Edward Thomson2015-10-151-0/+35
|\ \ \ | | | | | | | | revwalk: make commit list use 64 bits for time
| * | | revwalk: make commit list use 64 bits for timecmn/quick-parse-64Carlos Martín Nieto2015-10-141-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #3444 from ethomson/add_preserves_conflict_modeCarlos Martín Nieto2015-10-151-0/+88
|\ \ \ \ | | | | | | | | | | Preserve modes from a conflict in `git_index_insert`
| * | | | index: also try conflict mode when insertingEdward Thomson2015-09-301-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | index: test that add_bypath preserves modeEdward Thomson2015-09-291-0/+23
| | | | |
* | | | | odb: Prioritize alternate backendsvmg/odb-lookupsVicent Marti2015-10-141-8/+8
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | diff: don't feed large files to xdiffEdward Thomson2015-10-051-3/+3
| | | |
* | | | merge_file: treat large files as binaryEdward Thomson2015-10-051-0/+88
| |_|/ |/| | | | | | | | | | | | | | | | | | | | 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.
* | | refdb and odb backends must provide `free` functionArthur Schreiber2015-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #3411 from spraints/custom-push-headersCarlos Martín Nieto2015-09-306-17/+44
|\ \ \ | | | | | | | | Include custom HTTP headers
| * | | Add a test for custom header validationMatt Burke2015-09-101-0/+27
| | | | | | | | | | | | | | | | Also, *some* custom headers actually are valid.
| * | | Tell the git_transport about the custom_headersMatt Burke2015-09-085-17/+17
| | | |
* | | | win32::longpath: don't print pathlongpath-printfEdward Thomson2015-09-281-2/+0
| |/ / |/| |
* | | Merge pull request #3441 from libgit2/cmn/badsslEdward Thomson2015-09-281-0/+27
|\ \ \ | | | | | | | | net: add tests against badssl.com
| * | | net: add tests against badssl.comcmn/badsslCarlos Martín Nieto2015-09-271-0/+27
| | | | | | | | | | | | | | | | | | | | These provide bad X.509 certificates, which we should refuse to connect to by default.
* | | | Plug some leaksCarlos Martín Nieto2015-09-272-0/+7
|/ / /
* | | Fix binary diffsGuille -bisho-2015-09-251-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-