You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bdd27ec
Browse filesBrowse the repository at this point in the historyBrowse files
`Tree.cache` and `TreeModifier` were announced as removed in an old
changelog, but remain exported and supported. Their documentation also
suggested sorting alone would make edits persistent, leaving their status
and practical limits unclear.
Document that cache edits affect one instance and do not update its object
ID, stored tree, parents, index, or commits. Correct the historical removal
claim and recommend `IndexFile.write_tree()` for staged path changes.
Serialization already delegates construction to Git or Gix; no deprecation
or replacement implementation is needed. Git's `Documentation/git-mktree.adoc`
confirms that `mktree` normalizes entry order without pre-sorted input.
Add a regression covering local subtree edits, serialization into a new
object, and unchanged parent references. The focused tree tests passed
with both CLI and Gix backends (3 tests each), using Git 2.54.0 and
GixPython 0.3.0. The HTML build rendered the updated documentation; its
strict check reported one existing field-list warning in
`git.objects.submodule.util.is_relative_url`.
Copy file name to clipboardExpand all lines: doc/source/changes.rst
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,10 @@ Git executable and safety
51
51
API changes
52
52
-----------
53
53
54
+
* ``Tree.cache`` and ``TreeModifier`` remain supported. They edit one tree's
55
+
in-memory entries; object IDs and parent trees do not change automatically.
56
+
Tree serialization now delegates construction to Git or the supported Gix
57
+
backend. Prefer ``IndexFile.write_tree()`` for changes to staged paths.
54
58
* ``Commit.stats`` preserves Unicode line separators in filenames when
55
59
``core.quotePath=false``. Git's LF-delimited output remains intact for root,
56
60
subsequent and empty commits, including the Gix backend's existing filename
@@ -1135,7 +1139,10 @@ Please note that due to breaking changes, we have to increase the major version.
1135
1139
* CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not
1136
1140
divisiblej by 3600 seconds. This would happen if the timezone was something like `+0530` for instance.
1137
1141
* A list of all additional fixes can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed>`__
1138
-
* CRITICAL: `Tree.cache` was removed without replacement. It is technically impossible to change individual trees and expect their serialization results to be consistent with what *git* expects. Instead, use the `IndexFile` facilities to adjust the content of the staging area, and write it out to the respective tree objects using `IndexFile.write_tree()` instead.
1142
+
* Historical correction: ``Tree.cache`` was announced as removed, but the interface
1143
+
remained available. Its current behavior and limitations are documented in
1144
+
:class:`~git.objects.tree.TreeModifier`. Prefer ``IndexFile.write_tree()`` when
0 commit comments