diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-05 17:59:30 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-05 17:59:30 +0100 |
commit | 9ee861ae7a7b36a811aa4b5cc8172c5cbd6a945b (patch) | |
tree | 5d10bf275b67704b8873f1b0bd3cc4d55469d8a3 /lib/git/objects/base.py | |
parent | 453995f70f93c0071c5f7534f58864414f01cfde (diff) | |
download | gitpython-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/objects/base.py')
-rw-r--r-- | lib/git/objects/base.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/git/objects/base.py b/lib/git/objects/base.py index b0989a43..c66263c0 100644 --- a/lib/git/objects/base.py +++ b/lib/git/objects/base.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os -from git.utils import LazyMixin +from git.utils import LazyMixin, join_path_native import utils _assertion_msg_format = "Created object %r whose python type %r disagrees with the acutal git object type %r" @@ -209,7 +209,9 @@ class IndexObject(Object): """ Returns Absolute path to this index object in the file system ( as opposed to the - .path field which is a path relative to the git repository ) + .path field which is a path relative to the git repository ). + + The returned path will be native to the system and contains '\' on windows. """ - return os.path.join(self.repo.git.git_dir, self.path) + return join_path_native(self.repo.git.git_dir, self.path) |