@@ -249,7 +249,7 @@ def read_cache(stream: IO[bytes]) -> Tuple[int, Dict[Tuple[PathLike, int], 'Inde
249249
250250
251251def write_tree_from_cache (entries : List [IndexEntry ], odb , sl : slice , si : int = 0
252- ) -> Tuple [bytes , List [Tuple [str , int , str ]]]:
252+ ) -> Tuple [bytes , List [Tuple [bytes , int , str ]]]:
253253 """Create a tree from the given sorted list of entries and put the respective
254254 trees into the given object database
255255
@@ -298,12 +298,11 @@ def write_tree_from_cache(entries: List[IndexEntry], odb, sl: slice, si: int = 0
298298
299299 # finally create the tree
300300 sio = BytesIO ()
301- tree_to_stream (tree_items , sio .write ) # converts bytes of each item[0] to str
302- tree_items_stringified = cast (List [Tuple [str , int , str ]], tree_items )
301+ tree_to_stream (tree_items , sio .write ) # writes to stream as bytes, but doesnt change tree_items
303302 sio .seek (0 )
304303
305304 istream = odb .store (IStream (str_tree_type , len (sio .getvalue ()), sio ))
306- return (istream .binsha , tree_items_stringified )
305+ return (istream .binsha , tree_items )
307306
308307
309308def _tree_entry_to_baseindexentry (tree_entry : Tuple [bytes , int , str ], stage : int ) -> BaseIndexEntry :
0 commit comments