summaryrefslogtreecommitdiff
path: root/tests/checkout
Commit message (Collapse)AuthorAgeFilesLines
* checkout test: mark unused varsEdward Thomson2015-06-301-1/+4
|
* checkout test: check getcwd return valueEdward Thomson2015-06-291-1/+1
|
* checkout: plug a few leaksCarlos Martín Nieto2015-06-261-5/+15
|
* crlf tests: ensure that Unix obeys autocrlf=trueEdward Thomson2015-06-221-56/+17
| | | | | All platforms do terrible, horrible, no good, very bad translation when core.autocrlf=true. It's not just Windows!
* crlf tests: use known-good data produced by gitEdward Thomson2015-06-221-36/+156
| | | | | | Given a variety of combinations of core.autocrlf settings and attributes settings, test that we check out data into the working directory the same as a known-good test resource created by git.git.
* crlf: include utf8 resources in master branchEdward Thomson2015-06-221-7/+7
| | | | | Include the UTF8 and UTF8 BOM tests in the master crlf test branch for completeness.
* tests: tick over five seconds instead of oneCarlos Martín Nieto2015-06-201-1/+1
| | | | | | | | | | | | | When ticking over one second, it can happen that the actual time ticks over the same second between the time that we undermine our own race protections and the time in which we perform the index update. Such timing would make the time in the entries match the index' timestamp and we have not gained anything. Ticking over five seconds makes it so that if real-time rolls over that second, our index is still ahead. This is still suboptimal as we're dealing with timing, but five seconds should be long enough for any reasonable test runner to finish the tests.
* Fixed Xcode 6.1 build warningsPierre-Olivier Latour2015-06-171-1/+0
|
* Introduce p_utimes and p_futimesEdward Thomson2015-06-161-5/+7
| | | | | | Provide functionality to set the time on a filesystem entry, using utimes or futimes on POSIX type systems or SetFileTime on Win32.
* tests: tick the index when we count OID calculationsCarlos Martín Nieto2015-06-163-19/+22
| | | | | | | | | These tests want to test that we don't recalculate entries which match the index already. This is however something we force when truncating racily-clean entries. Tick the index forward as we know that we don't perform the modifications which the racily-clean code is trying to avoid.
* crlf: tick the index forward to work around racy-git behaviourCarlos Martín Nieto2015-06-161-4/+26
| | | | | | | | | | | | In order to avoid racy-git, we zero out the file size for entries with the same timestamp as the index (or during the initial checkout). This is the case in a couple of crlf tests, as the code is fast enough to do everything in the same second. As we know that we do not perform the modification just after writing out the index, which is what this is designed to work around, tick the mtime of the index file such that it doesn't agree with the files anymore, and we do not zero out these entries.
* Fix leaks in tests/checkout/icaseJeff Hostetler2015-06-121-0/+2
|
* Rename GIT_EMERGECONFLICT to GIT_ECONFLICTEdward Thomson2015-05-291-7/+7
| | | | | | | | | | We do not error on "merge conflicts"; on the contrary, merge conflicts are a normal part of merging. We only error on "checkout conflicts", where a change exists in the index or the working directory that would otherwise be overwritten by performing the checkout. This *may* happen during merge (after the production of the new index that we're going to checkout) but it could happen during any checkout.
* conflict tests: use GIT_IDXENTRY_STAGE_SETEdward Thomson2015-05-283-7/+7
|
* Fix ident replacement to match Git behaviorColomban Wendling2015-05-261-6/+6
| | | | | Git inserts a space after the SHA1 (as of 2.1.4 at least), so do the same.
* 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.
* checkout test: better case-insensitive test on MacEdward Thomson2015-05-041-3/+29
| | | | | | | | On Mac OS, `realpath` is deficient in determining the actual filename on-disk as it will simply provide the string you gave it if that file exists, instead of returning the filename as it exists. Instead we must read the directory entries for the parent directory to get the canonical filename.
* checkout test: only run icase on icase platformEdward Thomson2015-05-042-79/+61
|
* checkout: remove blocking dir when FORCEdEdward Thomson2015-05-041-7/+91
|
* Revert "Always checkout with case sensitive iterator"Edward Thomson2015-05-041-2/+13
| | | | This reverts commit 40d791545abfb3cb71553a27dc64129e1a9bec28.
* checkout test: ensure we write to casechanged dirEdward Thomson2015-05-041-0/+57
| | | | | | Ensure that on a case insensitive filesystem that we can checkout into some folder 'FOLDER' that exists on disk, even if the target of the checkout is a different case (eg 'folder').
* checkout test: ignore unstaged case-changing renamesEdward Thomson2015-05-041-0/+22
| | | | | | | | On Windows, you might sloppily rewrite a file (or have a sloppy text editor that does it for you) and accidentally change its case. (eg, "README" -> "readme"). Git ignores this accidental case changing rename during checkout and will happily write the new content to the file despite the name change. We should, too.
* Merge pull request #3032 from jfultz/index-file-modesEdward Thomson2015-04-231-2/+27
|\ | | | | Fix git_checkout_tree() to do index filemodes correctly on Windows.
| * Fix git_checkout_tree() to do index filemodes correctly on Windows.John Fultz2015-04-061-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | git_checkout_tree() has some fallback behaviors for file systems which don't have full support of filemodes. Generally works fine, but if a given file had a change of type from a 0644 to 0755 (i.e., you add executable permissions), the fallback behavior incorrectly triggers when writing hte updated index. This would cause a git_checkout_tree() command, even with the GIT_CHECKOUT_FORCE option set, to leave a dirty index on Windows. Also added checks to an existing test to catch this case.
* | Merge pull request #3030 from linquize/symlink_supportedEdward Thomson2015-04-101-0/+47
|\ \ | |/ |/| If work_dir is not specified, use repo_dir to test if symlink is supported
| * Test: Create repo in while current dir is readonly and checkout symlinkLinquize2015-04-041-0/+47
| |
* | Illustrate bad checkout on WindowsJacques Germishuys2015-03-251-0/+20
|/
* Lower case the include directive of windows headerClaudiu Olteanu2015-03-161-1/+1
| | | Since the Linux platform has a case sensitive file system, the header name should be lower case for cross compiling purposes. (On Linux, the mingw header is called ```windows.h```).
* Remove swp filesCarlos Martín Nieto2015-03-031-0/+0
|
* repository: remove log message override for switching the active branchCarlos Martín Nieto2015-03-033-17/+17
| | | | | | We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
* branch: don't accept a reflog message overrideCarlos Martín Nieto2015-03-031-3/+3
| | | | | | | This namespace is about behaving like git's branch command, so let's do exactly that instead of taking a reflog message. This override is still available via the reference namespace.
* reset: remove reflog message overrideCarlos Martín Nieto2015-03-031-1/+1
| | | | | This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-033-21/+21
| | | | | | | | | | The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
* checkout tests: just use SAFE where appropriateEdward Thomson2015-02-272-9/+4
|
* checkout: remove `GIT_CHECKOUT_SAFE_CREATE` as a strategyEdward Thomson2015-02-275-40/+58
|
* checkout: upgrade to `SAFE_CREATE` when no index fileEdward Thomson2015-02-271-0/+36
| | | | | | When the repository does not contain an index, emulate git's behavior and upgrade to `SAFE_CREATE`. This allows us to check out repositories created with `git clone --no-checkout`.
* checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEXEdward Thomson2015-02-141-0/+80
|
* Merge pull request #2866 from ethomson/checkout_perf2Carlos Martín Nieto2015-02-121-0/+54
|\ | | | | Checkout performance
| * remove some unused warningsEdward Thomson2015-02-041-0/+4
| |
| * checkout test: ensure .gitattributes lifecycleEdward Thomson2015-02-021-0/+50
| | | | | | | | | | | | The .gitattributes cache should not reload .gitattributes in the middle of checking out, only between checkout operations. Otherwise, we'll spend all our time stat'ing and read'ing the gitattributes.
* | win32: further cleanups for 8.3 disablingEdward Thomson2015-02-031-4/+1
| |
* | win32: cleanup 8.3 disabled testsEdward Thomson2015-02-031-23/+7
| |
* | Fix test failures when 8.3 is disabledLinquize2015-01-311-1/+23
|/
* checkout tests: cleanup realpath impl on Win32Edward Thomson2015-01-201-36/+6
|
* checkout tests: emulate p_realpath poorly on Win32Edward Thomson2015-01-201-1/+64
|
* checkout: remove files before writing new onesEdward Thomson2015-01-202-2/+99
| | | | | | | 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 tests: nasty symlinksEdward Thomson2015-01-201-1/+39
| | | | Symbolic links that abuse case insensitivity to write into .git.
* checkout: introduce git_checkout_perfdataEdward Thomson2015-01-201-0/+29
| | | | | Checkout can now provide performance data about the number of (some) syscalls performed using an optional callback.
* Add files and tests with many UTF-8 chars and few UTF-8 charsLinquize2015-01-201-0/+25
|
* Plug a couple of leaksCarlos Martín Nieto2015-01-041-0/+1
|