summaryrefslogtreecommitdiff
path: root/lib/git/index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-05 17:59:30 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-05 17:59:30 +0100
commit9ee861ae7a7b36a811aa4b5cc8172c5cbd6a945b (patch)
tree5d10bf275b67704b8873f1b0bd3cc4d55469d8a3 /lib/git/index.py
parent453995f70f93c0071c5f7534f58864414f01cfde (diff)
downloadgitpython-9ee861ae7a7b36a811aa4b5cc8172c5cbd6a945b.tar.gz
Added utilities helping to create proper paths either with slashes or backslashes depending on the operating system
fixed test_refs and test_trees Many more issues remain though, this is just a first backup commit
Diffstat (limited to 'lib/git/index.py')
-rw-r--r--lib/git/index.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/git/index.py b/lib/git/index.py
index e368f531..747ccc88 100644
--- a/lib/git/index.py
+++ b/lib/git/index.py
@@ -19,7 +19,7 @@ import subprocess
import git.diff as diff
from git.objects import Blob, Tree, Object, Commit
-from git.utils import SHA1Writer, LazyMixin, ConcurrentWriteOperation
+from git.utils import SHA1Writer, LazyMixin, ConcurrentWriteOperation, join_path_native
class _TemporaryFileSwap(object):
@@ -260,7 +260,7 @@ class IndexFile(LazyMixin, diff.Diffable):
super(IndexFile, self)._set_cache_(attr)
def _index_path(self):
- return os.path.join(self.repo.path, "index")
+ return join_path_native(self.repo.path, "index")
@property
@@ -440,7 +440,7 @@ class IndexFile(LazyMixin, diff.Diffable):
# as it considers existing entries. moving it essentially clears the index.
# Unfortunately there is no 'soft' way to do it.
# The _TemporaryFileSwap assure the original file get put back
- index_handler = _TemporaryFileSwap(os.path.join(repo.path, 'index'))
+ index_handler = _TemporaryFileSwap(join_path_native(repo.path, 'index'))
try:
repo.git.read_tree(*arg_list, **kwargs)
index = cls(repo, tmp_index)