diff options
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/index/base.py | 6 | ||||
-rw-r--r-- | lib/git/remote.py | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/git/index/base.py b/lib/git/index/base.py index 386926c5..cda52f75 100644 --- a/lib/git/index/base.py +++ b/lib/git/index/base.py @@ -56,6 +56,8 @@ from git.util import ( LockedFD, join_path_native, file_contents_ro, + to_native_path_linux, + to_native_path ) from fun import ( @@ -672,7 +674,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): gitrelative_path = abspath[len(self.repo.working_tree_dir)+1:] blob = Blob(self.repo, Blob.NULL_BIN_SHA, self._stat_mode_to_index_mode(os.stat(abspath).st_mode), - gitrelative_path) + to_native_path_linux(gitrelative_path)) entries.append(BaseIndexEntry.from_blob(blob)) # END for each path del(paths[:]) @@ -692,7 +694,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): istream = self.repo.odb.store(IStream(Blob.type, st.st_size, stream)) fprogress(filepath, True, filepath) return BaseIndexEntry((self._stat_mode_to_index_mode(st.st_mode), - istream.binsha, 0, filepath)) + istream.binsha, 0, to_native_path_linux(filepath))) # END utility method diff --git a/lib/git/remote.py b/lib/git/remote.py index 8442e809..8c75b1db 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -21,9 +21,9 @@ from refs import ( TagReference ) -from gitdb.util import ( - join, - ) +from git.util import join_path +from gitdb.util import join + import re import os @@ -366,7 +366,7 @@ class FetchInfo(object): if ref_type is SymbolicReference: remote_local_ref = ref_type(repo, "FETCH_HEAD") else: - remote_local_ref = Reference.from_path(repo, join(ref_type._common_path_default, remote_local_ref.strip())) + remote_local_ref = Reference.from_path(repo, join_path(ref_type._common_path_default, remote_local_ref.strip())) # END create ref instance note = ( note and note.strip() ) or '' |