diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-07-13 22:22:31 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-07-15 11:47:12 +0200 |
commit | 33819a21f419453bc2b4ca45b640b9a59361ed2b (patch) | |
tree | b9d68a13f210af582ea5d432bb51da936452b09c /lib/git/index/base.py | |
parent | 17a172920fde8c6688c8a1a39f258629b8b73757 (diff) | |
download | gitpython-33819a21f419453bc2b4ca45b640b9a59361ed2b.tar.gz |
Addiitonal win32 fixes related to, guess it, backslashes in paths
Diffstat (limited to 'lib/git/index/base.py')
-rw-r--r-- | lib/git/index/base.py | 6 |
1 files changed, 4 insertions, 2 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 |