summaryrefslogtreecommitdiff
path: root/tests/checkout/index.c
Commit message (Collapse)AuthorAgeFilesLines
* index: use new enum and structure namesEdward Thomson2018-12-011-3/+3
| | | | Use the new-style index names throughout our own codebase.
* symlink tests: test symbolic links on windowsethomson/win_symlinksEdward Thomson2018-10-201-31/+67
| | | | | | | | | Test updated symbolic link creation on Windows. Ensure that we emulate Git for Windows behavior. Ensure that when `core.symlinks=true` is set in a global configuration that new repositories are created without a `core.symlinks` setting, and that when `core.symlinks` is unset that `core.symlinks=false` in set in the repository. Further ensure that checkout honors the expected `core.symlinks` defaults on Windows.
* tests: provide symlink support helper functionEdward Thomson2018-10-201-22/+3
|
* checkout tests: ensure readlink succeedsEdward Thomson2018-10-201-1/+3
| | | | | | Don't try to use `link_size` as an index into a string if `p_readlink` returned <0. That will - obviously - fail and we'll write out of bounds.
* checkout tests: test symlinks based on support, not platformEdward Thomson2018-10-201-20/+48
| | | | | | | | | | | | | | When testing whether symlinks are correctly checked out, examine the `core.symlinks` configuration option to determine if symlinks are supported in a repository, don't simply assume that Windows means that symbolic links are not supported. Further, when testing the expected default behavior of `core.symlinks`, test the filesystem's support to determine if symlinks are supported. Finally, ensure that `core.symlinks=true` fails on a system where symlinks are actually not supported. This aligns with the behavior of Git for Windows.
* treewide: remove use of C++ style commentsPatrick Steinhardt2018-07-131-1/+1
| | | | | | | | | C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-2/+2
|
* test: Fix stat() test to mask out unwanted bitsFrançois Revol2016-05-241-2/+3
| | | | Haiku and Hurd both pass extra bits in struct stat::st_mode.
* checkout test: Apply umask to file-mode test as wellMichał Górny2015-12-011-1/+1
| | | | | | | | 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>
* git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson2015-09-171-1/+1
| | | | | | | | | | | | Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
* checkout test: check getcwd return valueEdward Thomson2015-06-291-1/+1
|
* conflict tests: use GIT_IDXENTRY_STAGE_SETEdward Thomson2015-05-281-3/+3
|
* Remove the callbacks struct from the remoteCarlos Martín Nieto2015-05-131-3/+1
| | | | | | | | | | | | | | Having the setting be different from calling its actions was not a great idea and made for the sake of the wrong convenience. Instead of that, accept either fetch options, push options or the callbacks when dealing with the remote. The fetch options are currently only the callbacks, but more options will be moved from setters and getters on the remote to the options. This does mean passing the same struct along the different functions but the typical use-case will only call git_remote_fetch() or git_remote_push() and so won't notice much difference.
* Test: Create repo in while current dir is readonly and checkout symlinkLinquize2015-04-041-0/+47
|
* checkout: remove `GIT_CHECKOUT_SAFE_CREATE` as a strategyEdward Thomson2015-02-271-19/+30
|
* checkout: remove files before writing new onesEdward Thomson2015-01-201-2/+2
| | | | | | | On case insensitive filesystems, we may have files in the working directory that case fold to a name we want to write. Remove those files (by default) so that we will not end up with a filename that has the unexpected case.
* checkout_index: Remove stage 0 when checking out conflictsEdward Thomson2014-11-061-10/+39
|
* Introduce failing test for conflict filtering in indexEdward Thomson2014-10-131-0/+69
|
* git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-23/+23
|
* diff: rename the file's 'oid' to 'id'Carlos Martín Nieto2014-01-251-2/+2
| | | | In the same vein as the previous commits in this series.
* Rename tests-clar to testsBen Straub2013-11-141-0/+620