diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-06-22 19:17:08 +0900 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-06-29 14:54:29 +0100 |
| commit | bfa1f02292d1b637928fe18663a5f2d0aa993400 (patch) | |
| tree | 0d08a6eb80acf9b6114d2f817cd9e8cd711daf10 /docs | |
| parent | 787768c2d70dfcd1c9ebc1854b5d0f67d2e6d4d9 (diff) | |
| download | libgit2-bfa1f02292d1b637928fe18663a5f2d0aa993400.tar.gz | |
settings: optional unsaved index safety
Add the `GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY` option, which will cause
commands that reload the on-disk index to fail if the current
`git_index` has changed that have not been saved. This will prevent
users from - for example - adding a file to the index then calling a
function like `git_checkout` and having that file be silently removed
from the index since it was re-read from disk.
Now calls that would re-read the index will fail if the index is
"dirty", meaning changes have been made to it but have not been written.
Users can either `git_index_read` to discard those changes explicitly,
or `git_index_write` to write them.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
