Added GIT_BRANCH_ALL
This commit is contained in:
parent
d6716e035a
commit
320ee5e733
@ -45,7 +45,7 @@ from _pygit2 import Repository as _Repository, init_file_backend
|
||||
from _pygit2 import Oid, GIT_OID_HEXSZ, GIT_OID_MINPREFIXLEN
|
||||
from _pygit2 import GIT_CHECKOUT_SAFE, GIT_CHECKOUT_RECREATE_MISSING, GIT_DIFF_NORMAL
|
||||
from _pygit2 import GIT_FILEMODE_LINK
|
||||
from _pygit2 import GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE
|
||||
from _pygit2 import GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE, GIT_BRANCH_ALL
|
||||
from _pygit2 import Reference, Tree, Commit, Blob, Signature
|
||||
|
||||
from .config import Config
|
||||
@ -999,11 +999,11 @@ class BaseRepository(_Repository):
|
||||
|
||||
|
||||
class Branches(object):
|
||||
def __init__(self, repository, flag=GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE):
|
||||
def __init__(self, repository, flag=GIT_BRANCH_ALL):
|
||||
self._repository = repository
|
||||
self._flag = flag
|
||||
|
||||
if flag == GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE:
|
||||
if flag == GIT_BRANCH_ALL:
|
||||
self.local = Branches(repository, flag=GIT_BRANCH_LOCAL)
|
||||
self.remote = Branches(repository, flag=GIT_BRANCH_REMOTE)
|
||||
|
||||
|
@ -303,6 +303,7 @@ moduleinit(PyObject* m)
|
||||
ADD_TYPE(m, Branch)
|
||||
ADD_CONSTANT_INT(m, GIT_BRANCH_LOCAL)
|
||||
ADD_CONSTANT_INT(m, GIT_BRANCH_REMOTE)
|
||||
ADD_CONSTANT_INT(m, GIT_BRANCH_ALL)
|
||||
|
||||
/*
|
||||
* Index & Working copy
|
||||
|
Loading…
x
Reference in New Issue
Block a user