FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

support passing odbt for using with Repo by hvnsweeting · Pull Request #291 · gitpython-developers/GitPython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 7 additions & 2 deletions git/repo/base.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def blame(self, rev, file):
return blames

@classmethod
def init(cls, path=None, mkdir=True, **kwargs):
def init(cls, path=None, mkdir=True, odbt=DefaultDBType, **kwargs):
"""Initialize a git repository at the given path if specified

:param path:
Expand All @@ -750,6 +750,11 @@ def init(cls, path=None, mkdir=True, **kwargs):
already exists. Creates the directory with a mode=0755.
Only effective if a path is explicitly given

:param odbt:
Object DataBase type - a type which is constructed by providing
the directory containing the database objects, i.e. .git/objects.
It will be used to access all object data

:parm kwargs:
keyword arguments serving as additional options to the git-init command

Expand All @@ -762,7 +767,7 @@ def init(cls, path=None, mkdir=True, **kwargs):
# git command automatically chdir into the directory
git = Git(path)
git.init(**kwargs)
return cls(path)
return cls(path, odbt=odbt)

@classmethod
def _clone(cls, git, url, path, odb_default_type, progress, **kwargs):
Expand Down

Back | FazBrowse Home | New Git URL