summaryrefslogtreecommitdiff
path: root/tests/checkout/tree.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-281-3/+3
|
* checkout test: only run icase on icase platformEdward Thomson2015-05-041-79/+0
|
* 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.
* 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.
* repository: remove log message override for switching the active branchCarlos Martín Nieto2015-03-031-14/+14
| | | | | | 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-031-18/+18
| | | | | | | | | | 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-271-7/+3
|
* checkout: remove `GIT_CHECKOUT_SAFE_CREATE` as a strategyEdward Thomson2015-02-271-5/+11
|
* 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
|
* 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.
* 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.
* Plug a couple of leaksCarlos Martín Nieto2015-01-041-0/+1
|
* Always checkout with case sensitive iteratorEdward Thomson2014-12-231-13/+2
| | | | | | | | | On a case-insensitive filesystem, we need to deal with case-changing renames (eg, foo -> FOO) by removing the old and adding the new, exactly as if we were on a case-sensitive filesystem. Update the `checkout::tree::can_cancel_checkout_from_notify` test, now that notifications are always sent case sensitively.
* Introduce test for checkout case-changing renameEdward Thomson2014-12-231-0/+77
|
* Plug leaksCarlos Martín Nieto2014-11-231-0/+2
| | | | Valgrind is now clean except for libssl and libgcrypt.
* checkout_index: remove conflicts when checking out new filesEdward Thomson2014-11-061-3/+87
|
* Allow to propagate checkout callbacks to git HARD resetSven Strickroth2014-08-031-1/+1
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-18/+18
|
* Add reflog parameters to git_resetBen Straub2014-02-031-1/+1
|
* Add reflog params to git_branch_createBen Straub2014-01-301-1/+1
|
* Add reflog params to set-head callsBen Straub2014-01-301-11/+11
|
* index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-3/+3
| | | | This was not converted when we converted the rest, so do it now.
* Preserve tree filemode in index during checkoutEdward Thomson2014-01-221-0/+23
| | | | | | Don't try to determine whether the system supports file modes when putting the tree data in the index during checkout. The tree's mode is canonical and did not come from stat(2) in the first place.
* refs: remove the _with_log differentiationCarlos Martín Nieto2014-01-151-1/+1
| | | | | | Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
* Overwrite ignored directories on checkoutEdward Thomson2013-12-131-7/+40
|
* Overwrite ignored files on checkoutEdward Thomson2013-12-131-0/+74
|
* Try a test that won't assert on LinuxRussell Belfer2013-12-111-2/+2
|
* Fix checkout notify callback docs and testsRussell Belfer2013-12-111-0/+78
| | | | | | | The checkout notify callback behavior on non-zero return values was not being tested. This adds tests, fixes a bug with positive values, and clarifies the documentation to make it clear that the checkout can be canceled via this mechanism.
* Rename tests-clar to testsBen Straub2013-11-141-0/+742