diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-15 13:42:33 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-16 02:46:32 +0200 |
commit | b02662d4e870a34d2c6d97d4f702fcc1311e5177 (patch) | |
tree | 6f2bc1d942f979b3bb379d833700fe33f955415d /git/objects | |
parent | 0210e394e0776d0b7097bf666bebd690ed0c0e4f (diff) | |
download | gitpython-b02662d4e870a34d2c6d97d4f702fcc1311e5177.tar.gz |
src: reduce needless deps to `gitdb.util`
Diffstat (limited to 'git/objects')
-rw-r--r-- | git/objects/base.py | 13 | ||||
-rw-r--r-- | git/objects/commit.py | 2 | ||||
-rw-r--r-- | git/objects/tag.py | 9 | ||||
-rw-r--r-- | git/objects/tree.py | 4 |
4 files changed, 12 insertions, 16 deletions
diff --git a/git/objects/base.py b/git/objects/base.py index 0b849960..d6080779 100644 --- a/git/objects/base.py +++ b/git/objects/base.py @@ -3,14 +3,13 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from .util import get_object_type_by_name -from git.util import LazyMixin, join_path_native, stream_copy -from gitdb.util import ( - bin_to_hex, - basename -) +from git.util import LazyMixin, join_path_native, stream_copy, bin_to_hex import gitdb.typ as dbtyp +import os.path as osp + +from .util import get_object_type_by_name + _assertion_msg_format = "Created object %r whose python type %r disagrees with the acutal git object type %r" @@ -170,7 +169,7 @@ class IndexObject(Object): @property def name(self): """:return: Name portion of the path, effectively being the basename""" - return basename(self.path) + return osp.basename(self.path) @property def abspath(self): diff --git a/git/objects/commit.py b/git/objects/commit.py index 1534c552..85955806 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -5,8 +5,8 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php from gitdb import IStream -from gitdb.util import hex_to_bin from git.util import ( + hex_to_bin, Actor, Iterable, Stats, diff --git a/git/objects/tag.py b/git/objects/tag.py index cefff083..19cb04bf 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -5,12 +5,9 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php """ Module containing all object based types. """ from . import base -from .util import ( - get_object_type_by_name, - parse_actor_and_date -) -from gitdb.util import hex_to_bin -from git.compat import defenc +from .util import get_object_type_by_name, parse_actor_and_date +from ..util import hex_to_bin +from ..compat import defenc __all__ = ("TagObject", ) diff --git a/git/objects/tree.py b/git/objects/tree.py index 4f853f92..46fe63e7 100644 --- a/git/objects/tree.py +++ b/git/objects/tree.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php from git.util import join_path import git.diff as diff -from gitdb.util import to_bin_sha +from git.util import to_bin_sha from . import util from .base import IndexObject @@ -18,7 +18,7 @@ from .fun import ( tree_to_stream ) -from gitdb.utils.compat import PY3 +from git.compat import PY3 if PY3: cmp = lambda a, b: (a > b) - (a < b) |