diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2013-01-12 19:27:31 +0100 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2013-01-13 10:25:54 +0100 |
| commit | 2a3b3e0324b272c50c8d2d7767bd4d55c4d453f6 (patch) | |
| tree | 3051f2ff2113854350b906462b2017bd46c7a8af /tests-clar | |
| parent | 09e29e47b3ee18888cfb0fc4abd5346b390e70fb (diff) | |
| download | libgit2-2a3b3e0324b272c50c8d2d7767bd4d55c4d453f6.tar.gz | |
checkout: Teach checkout to cope with orphaned Head
Fix #1236
Diffstat (limited to 'tests-clar')
| -rw-r--r-- | tests-clar/checkout/index.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests-clar/checkout/index.c b/tests-clar/checkout/index.c index 2dc08715d..22c6217b9 100644 --- a/tests-clar/checkout/index.c +++ b/tests-clar/checkout/index.c @@ -498,3 +498,13 @@ void test_checkout_index__can_update_prefixed_files(void) cl_assert(!git_path_exists("testrepo/branch_file")); cl_assert(!git_path_exists("testrepo/branch_file.txt.after")); } + +void test_checkout_index__can_checkout_a_newly_initialized_repository(void) +{ + test_checkout_index__cleanup(); + + g_repo = cl_git_sandbox_init("empty_standard_repo"); + cl_git_remove_placeholders(git_repository_path(g_repo), "dummy-marker.txt"); + + cl_git_pass(git_checkout_index(g_repo, NULL, NULL)); +} |
