You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e8201d
Browse filesBrowse the repository at this point in the historyBrowse files
docs: align source-checkout test instructions with pytest
The source installation guide still recommends `python -m unittest`, although the repository configures its suite with `pytest` and contributor instructions require the test extra and an explicit backend selection.
Show how to enter the checkout, install `.[test]`, and run `pytest` with `GIT_PYTHON_BACKEND=cli`. List the test-suite prerequisites and link to `CONTRIBUTING.md` so package installation and contributor testing are not conflated.
Validation: `git diff --check` passed. Docutils parsed the updated Source Code section without warnings. The full test suite was not run for this documentation-only change.
Agent-Model: unknown
Copy file name to clipboardExpand all lines: doc/source/intro.rst
+124Lines changed: 124 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,133 @@ It provides Python objects for repository data and delegates Git operations to t
10
10
11
11
The object database implementation is optimized for handling large quantities of objects and large datasets, which is achieved by using low-level structures and data streaming.
12
12
13
+
Requirements
14
+
============.. _intro_toplevel:
15
+
16
+
==================
17
+
Overview / Install
18
+
==================
19
+
20
+
GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
21
+
22
+
It provides Python objects for repository data and delegates Git operations to the Git executable. The default backend supports both SHA-1 and SHA-256 object IDs and both files and reftable reference storage. ``GitDB`` is an alias for ``GitCmdObjectDB``; the pure-Python storage implementation is unavailable.
23
+
24
+
The object database implementation is optimized for handling large quantities of objects and large datasets, which is achieved by using low-level structures and data streaming.
Alternatively, you can install from the distribution using the ``setup.py``
61
+
script:
62
+
63
+
.. sourcecode:: none
64
+
65
+
# python setup.py install
66
+
67
+
.. note:: In this case, you have to manually install `GitDB`_ as well. It would be recommended to use the :ref:`git source repository <source-code-label>` in that case.
68
+
69
+
Limitations
70
+
===========
71
+
72
+
Leakage of System Resources
73
+
---------------------------
74
+
75
+
GitPython is not suited for long-running processes (like daemons) as it tends to
76
+
leak system resources. It was written in a time where destructors (as implemented
77
+
in the `__del__` method) still ran deterministically.
78
+
79
+
In case you still want to use it in such a context, you will want to search the
80
+
codebase for `__del__` implementations and call these yourself when you see fit.
81
+
82
+
Another way assure proper cleanup of resources is to factor out GitPython into a
83
+
separate process which can be dropped periodically.
84
+
85
+
Getting Started
86
+
===============
87
+
88
+
* :ref:`tutorial-label` - This tutorial provides a walk-through of some of
89
+
the basic functionality and concepts used in GitPython. It, however, is not
90
+
exhaustive so you are encouraged to spend some time in the
91
+
:ref:`api_reference_toplevel`.
92
+
93
+
API Reference
94
+
=============
95
+
96
+
An organized section of the GitPython API is at :ref:`api_reference_toplevel`.
97
+
98
+
.. _source-code-label:
99
+
100
+
Source Code
101
+
===========
102
+
103
+
GitPython's git repo is available on GitHub, which can be browsed at:
0 commit comments