Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit640d150

Browse files
committed
Merge pull request#291 from hvnsweeting/support-init-choosing-backend
support passing odbt for using with Repo
2 parents4a771ad +643e636 commit640d150

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎git/repo/base.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ def blame(self, rev, file):
744744
returnblames
745745

746746
@classmethod
747-
definit(cls,path=None,mkdir=True,**kwargs):
747+
definit(cls,path=None,mkdir=True,odbt=DefaultDBType,**kwargs):
748748
"""Initialize a git repository at the given path if specified
749749
750750
:param path:
@@ -757,6 +757,11 @@ def init(cls, path=None, mkdir=True, **kwargs):
757757
already exists. Creates the directory with a mode=0755.
758758
Only effective if a path is explicitly given
759759
760+
:param odbt:
761+
Object DataBase type - a type which is constructed by providing
762+
the directory containing the database objects, i.e. .git/objects.
763+
It will be used to access all object data
764+
760765
:parm kwargs:
761766
keyword arguments serving as additional options to the git-init command
762767
@@ -769,7 +774,7 @@ def init(cls, path=None, mkdir=True, **kwargs):
769774
# git command automatically chdir into the directory
770775
git=Git(path)
771776
git.init(**kwargs)
772-
returncls(path)
777+
returncls(path,odbt=odbt)
773778

774779
@classmethod
775780
def_clone(cls,git,url,path,odb_default_type,progress,**kwargs):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp