summaryrefslogtreecommitdiff
path: root/doc/source/changes.rst
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-04-08 09:50:26 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-04-08 09:50:26 +0200
commit8f043d8a1d7f4076350ff0c778bfa60f7aa2f7aa (patch)
tree4d2a80c70fc35bf69d5779347c5e6802c8b9d0c9 /doc/source/changes.rst
parentab7c3223076306ca71f692ed5979199863cf45a7 (diff)
downloadgitpython-8f043d8a1d7f4076350ff0c778bfa60f7aa2f7aa.tar.gz
fix(index): don't write extension data by default
It turned out that the index is not actually corrupted, which is good news. What happens is that `git` writes `TREE` extension data into the index, which causes it to write out the given tree *as is* next time a `git commit` is executed. When using `git add`, this extension data is maintained automatically. However, GitPython doesn't do that ... . Usually this is no problem at all, as you are supposed to use `IndexFile.commit(...)` along with `IndexFile.add(...)`. Thanks to a shortcoming in the GitPython API, the index was automatically written out whenever files have been added, without providing control over whether or not *extension data* will be written along with it. My fix consists of an additional flag in `IndexFile.add(...)`, which causes extension data not to be written by default, so commits can be safely done via `git commit` or `IndexFile.commit(...)`. However, this might introduce new subtle bugs in case someone is relying on extension data to be written. As this can be controlled through the said flag though, a fix is easily done in that case. Fixes #265
Diffstat (limited to 'doc/source/changes.rst')
-rw-r--r--doc/source/changes.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/source/changes.rst b/doc/source/changes.rst
index 5b85e56a..52d70c0f 100644
--- a/doc/source/changes.rst
+++ b/doc/source/changes.rst
@@ -2,6 +2,12 @@
Changelog
=========
+0.3.7 - Fixes
+=============
+* `IndexFile.add()` will now write the index without any extension data by default. However, you may override this behaviour with the new `write_extension_data` keyword argument.
+
+ - Renamed `ignore_tree_extension_data` keyword argument in `IndexFile.write(...)` to `ignore_extension_data`
+
0.3.6 - Features
================
* **DOCS**