Skip to content

Commit 243d40d

Browse files
committed
docs: add unsaved index safety to changelog
1 parent bfa1f02 commit 243d40d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ v0.27 + 1
1616
* You can now swap out memory allocators via the
1717
`GIT_OPT_SET_ALLOCATOR` option with `git_libgit2_opts()`.
1818

19+
* You can now ensure that functions do not discard unwritten changes to the
20+
index via the `GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY` option to
21+
`git_libgit2_opts()`. This will cause functions that implicitly re-read
22+
the index (eg, `git_checkout`) to fail if you have staged changes to the
23+
index but you have not written the index to disk. (Unless the checkout
24+
has the FORCE flag specified.)
25+
26+
At present, this defaults to off, but we intend to enable this more
27+
broadly in the future, as a warning or error. We encourage you to
28+
examine your code to ensure that you are not relying on the current
29+
behavior that implicitly removes staged changes.
30+
1931
### API removals
2032

2133
### Breaking API changes

0 commit comments

Comments
 (0)