Remove obsolete git-branch recipe
The git-branch recipe says: »Note that the next release will probably allow repo.listall_branches().« Concluding from the README, Repository.listall_branches() was included in some release prior to 0.20.0, so at least that statement is obsolete. However, since pygit2.org brings up fairly accurate results for a search on »list all branches«, I figured that the whole recipe isn't needed anymore. Therefore delete it.
This commit is contained in:
@@ -17,7 +17,6 @@ Main porcelain commands
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
git-branch (List, create, or delete branches.) <recipes/git-branch>
|
||||
git-init (Create an empty git repository or reinitialize an existing one.) <recipes/git-init>
|
||||
git-log (Show commit logs.) <recipes/git-log>
|
||||
git-show (Show various types of objects.) <recipes/git-show>
|
||||
|
@@ -1,30 +0,0 @@
|
||||
**********************************************************************
|
||||
git-branch
|
||||
**********************************************************************
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Listing branches
|
||||
----------------------------------------------------------------------
|
||||
|
||||
======================================================================
|
||||
List all branches
|
||||
======================================================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$> git branch
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> regex = re.compile('^refs/heads/')
|
||||
>>> branches = filter(lambda r: regex.match(r), repo.listall_references())
|
||||
|
||||
`Note that the next release will probably allow` ``repo.listall_branches()``.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
References
|
||||
----------------------------------------------------------------------
|
||||
|
||||
- git-branch_.
|
||||
|
||||
.. _git-branch: https://www.kernel.org/pub/software/scm/git/docs/git-branch.html
|
Reference in New Issue
Block a user