diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2017-11-17 00:19:07 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-06-29 14:54:28 +0100 |
commit | b242cdbf1e1dd2cc9e26e0085a20230ff34d156b (patch) | |
tree | 477b5d83b340080204f7d1f80e1e27c14c229804 /src/checkout.c | |
parent | dc4a18c7455e1696b2056a02f934e1f7ac80d940 (diff) | |
download | libgit2-b242cdbf1e1dd2cc9e26e0085a20230ff34d156b.tar.gz |
index: commit the changes to the index properly
Now that the index has a "dirty" state, where it has changes that have
not yet been committed or rolled back, our tests need to be adapted to
actually commit or rollback the changes instead of assuming that the
index can be operated on in its indeterminate state.
Diffstat (limited to 'src/checkout.c')
-rw-r--r-- | src/checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c index 0ab2c6aca..d72f227de 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -2412,7 +2412,7 @@ static int checkout_data_init( * and those should not be overwritten.) */ if (data->index != git_iterator_index(target)) { - if ((error = git_index_read(data->index, true)) < 0) + if ((error = git_index_read_safely(data->index)) < 0) goto cleanup; /* cannot checkout if unresolved conflicts exist */ |