|
@@ -21,7 +21,6 @@
|
|
|
import collections
|
|
|
import errno
|
|
|
import os
|
|
|
-import platform
|
|
|
import stat
|
|
|
import struct
|
|
|
import sys
|
|
@@ -488,7 +487,7 @@ def build_index_from_tree(root_path, index_path, object_store, tree_id,
|
|
|
for entry in object_store.iter_tree_contents(tree_id):
|
|
|
if not validate_path(entry.path, validate_path_element):
|
|
|
continue
|
|
|
- fs_path = tree_to_fs_path(entry.path)
|
|
|
+ fs_path = _tree_to_fs_path(entry.path)
|
|
|
full_path = os.path.join(root_path, fs_path)
|
|
|
|
|
|
if not os.path.exists(os.path.dirname(full_path)):
|
|
@@ -534,7 +533,7 @@ def get_unstaged_changes(index, root_path):
|
|
|
root_path = root_path.encode(sys.getfilesystemencoding())
|
|
|
|
|
|
for tree_path, entry in index.iteritems():
|
|
|
- fs_path = tree_to_fs_path(tree_path)
|
|
|
+ fs_path = _tree_to_fs_path(tree_path)
|
|
|
full_path = os.path.join(root_path, fs_path)
|
|
|
blob = blob_from_path_and_stat(full_path, os.lstat(full_path))
|
|
|
if blob.id != entry.sha:
|
|
@@ -544,7 +543,7 @@ def get_unstaged_changes(index, root_path):
|
|
|
os_sep_bytes = os.sep.encode('ascii')
|
|
|
|
|
|
|
|
|
-def tree_to_fs_path(tree_path):
|
|
|
+def _tree_to_fs_path(tree_path):
|
|
|
"""Convert a git tree path to a file system path.
|
|
|
|
|
|
:param tree_path: Git tree path as bytes
|
|
@@ -559,7 +558,7 @@ def tree_to_fs_path(tree_path):
|
|
|
return sep_corrected_path
|
|
|
|
|
|
|
|
|
-def fs_to_tree_path(fs_path):
|
|
|
+def _fs_to_tree_path(fs_path):
|
|
|
"""Convert a file system path to a git tree path.
|
|
|
|
|
|
:param fs_path: File system path.
|