File tree Expand file tree Collapse file tree 8 files changed +56
-12
lines changed Expand file tree Collapse file tree 8 files changed +56
-12
lines changed Original file line number Diff line number Diff line change 22Changelog
33=========
44
5+ 0.3.2 Beta 2
6+ ============
7+ * Added reflog support ( reading and writing )
8+
590.3.2 Beta 1
610============
711* Flattened directory structure to make development more convenient.
Original file line number Diff line number Diff line change 2020# is relative to the documentation root, use os.path.abspath to make it
2121# absolute, like shown here.
2222#sys.path.append(os.path.abspath('.'))
23- sys .path .insert (0 , os .path .abspath ('../../lib ' ))
23+ sys .path .insert (0 , os .path .abspath ('../../../ ' ))
2424
2525# General configuration
2626# ---------------------
Original file line number Diff line number Diff line change @@ -131,13 +131,48 @@ Exceptions
131131 :undoc-members:
132132
133133
134- Refs
135- ----
134+ Refs.symbolic
135+ -------------
136+
137+ .. automodule :: git.refs.symbolic
138+ :members:
139+ :undoc-members:
140+
141+ Refs.reference
142+ --------------
136143
137- .. automodule :: git.refs
144+ .. automodule :: git.refs.reference
138145 :members:
139146 :undoc-members:
140147
148+ Refs.head
149+ ---------
150+
151+ .. automodule :: git.refs.head
152+ :members:
153+ :undoc-members:
154+
155+ Refs.tag
156+ ------------
157+
158+ .. automodule :: git.refs.tag
159+ :members:
160+ :undoc-members:
161+
162+ Refs.remote
163+ ------------
164+
165+ .. automodule :: git.refs.remote
166+ :members:
167+ :undoc-members:
168+
169+ Refs.log
170+ ------------
171+
172+ .. automodule :: git.refs.log
173+ :members:
174+ :undoc-members:
175+
141176Remote
142177------
143178
Original file line number Diff line number Diff line change @@ -88,6 +88,14 @@ A symbolic reference is a special case of a reference as it points to another re
8888 head = repo.head # the head points to the active branch/ref
8989 master = head.reference # retrieve the reference the head points to
9090 master.commit # from here you use it as any other reference
91+
92+ Access the reflog easily::
93+
94+ log = master.log()
95+ log[0] # first (i.e. oldest) reflog entry
96+ log[-1] # last (i.e. most recent) reflog entry
97+
98+ For more information on the reflog, see the ``RefLog `` type's documentation.
9199
92100Modifying References
93101********************
Original file line number Diff line number Diff line change 33#
44# This module is part of GitPython and is released under
55# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6- """Module containing Index implementation, allowing to perform all kinds of index
7- manipulations such as querying and merging."""
86import tempfile
97import os
108import sys
Original file line number Diff line number Diff line change 1- """
2- Contains standalone functions to accompany the index implementation and make it
3- more versatile
4- """
1+ # Contains standalone functions to accompany the index implementation and make it
2+ # more versatile
3+ # NOTE: Autodoc hates it if this is a docstring
54from stat import (
65 S_IFDIR ,
76 S_IFLNK ,
Original file line number Diff line number Diff line change 1- """ Module containing all ref based objects """
21from symbolic import SymbolicReference
32from reference import Reference
43
Original file line number Diff line number Diff line change 33#
44# This module is part of GitPython and is released under
55# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6- """Module implementing a remote object allowing easy access to git remotes"""
6+
7+ # Module implementing a remote object allowing easy access to git remotes
78
89from exc import GitCommandError
910from objects import Commit
You can’t perform that action at this time.
0 commit comments