diff options
| author | Russell Belfer <rb@github.com> | 2012-12-10 15:31:43 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-01-04 15:47:42 -0800 |
| commit | 7e5c8a5b41ca660def7de23fd32b942878a6ee24 (patch) | |
| tree | 477e12bfca0e05c6458ee7bcb25f235ced2714c0 /tests-clar/checkout/tree.c | |
| parent | cf208031705388a2d1907fb9ec409ff22179f380 (diff) | |
| download | libgit2-7e5c8a5b41ca660def7de23fd32b942878a6ee24.tar.gz | |
More checkout improvements
This flips checkout back to be driven off the changes between
the baseline and the target trees. This reinstates the complex
code for tracking the contents of the working directory, but
overall, I think the resulting logic is easier to follow.
Diffstat (limited to 'tests-clar/checkout/tree.c')
| -rw-r--r-- | tests-clar/checkout/tree.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests-clar/checkout/tree.c b/tests-clar/checkout/tree.c index ed46748ae..ab502dd30 100644 --- a/tests-clar/checkout/tree.c +++ b/tests-clar/checkout/tree.c @@ -126,9 +126,10 @@ void test_checkout_tree__doesnt_write_unrequested_files_to_worktree(void) cl_git_pass(git_commit_lookup(&p_master_commit, g_repo, &master_oid)); cl_git_pass(git_commit_lookup(&p_chomped_commit, g_repo, &chomped_oid)); - /* A GIT_CHECKOUT_DEFAULT checkout is not allowed to add any file to the - * working tree from the index as it is supposed to be a dry run. */ - opts.checkout_strategy = GIT_CHECKOUT_DEFAULT; + /* GIT_CHECKOUT_NONE should not add any file to the working tree from the + * index as it is supposed to be a dry run. + */ + opts.checkout_strategy = GIT_CHECKOUT_NONE; git_checkout_tree(g_repo, (git_object*)p_chomped_commit, &opts); cl_assert_equal_i(false, git_path_isfile("testrepo/readme.txt")); } |
