diff options
Diffstat (limited to 'doc/doc_index/0.1/reference.html')
-rw-r--r-- | doc/doc_index/0.1/reference.html | 1073 |
1 files changed, 0 insertions, 1073 deletions
diff --git a/doc/doc_index/0.1/reference.html b/doc/doc_index/0.1/reference.html deleted file mode 100644 index ce56826c..00000000 --- a/doc/doc_index/0.1/reference.html +++ /dev/null @@ -1,1073 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>API Reference — GitPython v0.1.7 documentation</title> - <link rel="stylesheet" href="_static/default.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '#', - VERSION: '0.1.7', - COLLAPSE_MODINDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <link rel="top" title="GitPython v0.1.7 documentation" href="index.html" /> - <link rel="prev" title="GitPython Tutorial" href="tutorial.html" /> - </head> - <body> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="modindex.html" title="Global Module Index" - accesskey="M">modules</a> |</li> - <li class="right" > - <a href="tutorial.html" title="GitPython Tutorial" - accesskey="P">previous</a> |</li> - <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="api-reference"> -<span id="api-reference-toplevel"></span><h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1> -<div class="section" id="module-git.actor"> -<h2>Actor<a class="headerlink" href="#module-git.actor" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.actor.Actor"> -<em class="property">class </em><tt class="descclassname">git.actor.</tt><tt class="descname">Actor</tt><big>(</big><em>name</em>, <em>email</em><big>)</big><a class="headerlink" href="#git.actor.Actor" title="Permalink to this definition">¶</a></dt> -<dd><p>Actors hold information about a person acting on the repository. They -can be committers and authors or anything with a name and an email as -mentioned in the git log entries.</p> -<dl class="classmethod"> -<dt id="git.actor.Actor.from_string"> -<em class="property">classmethod </em><tt class="descname">from_string</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#git.actor.Actor.from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Create an Actor from a string.</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">str</span></tt></dt> -<dd>is the string, which is expected to be in regular git format</dd> -<dt>Format</dt> -<dd>John Doe <<a class="reference external" href="mailto:jdoe%40example.com">jdoe<span>@</span>example<span>.</span>com</a>></dd> -<dt>Returns</dt> -<dd>Actor</dd> -</dl> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.blob"> -<h2>Blob<a class="headerlink" href="#module-git.blob" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.blob.Blob"> -<em class="property">class </em><tt class="descclassname">git.blob.</tt><tt class="descname">Blob</tt><big>(</big><em>repo</em>, <em>id</em>, <em>mode=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#git.blob.Blob" title="Permalink to this definition">¶</a></dt> -<dd><p>A Blob encapsulates a git blob object</p> -<dl class="attribute"> -<dt id="git.blob.Blob.basename"> -<tt class="descname">basename</tt><a class="headerlink" href="#git.blob.Blob.basename" title="Permalink to this definition">¶</a></dt> -<dd><dl class="docutils"> -<dt>Returns</dt> -<dd>The basename of the Blobs file name</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.blob.Blob.blame"> -<em class="property">classmethod </em><tt class="descname">blame</tt><big>(</big><em>repo</em>, <em>commit</em>, <em>file</em><big>)</big><a class="headerlink" href="#git.blob.Blob.blame" title="Permalink to this definition">¶</a></dt> -<dd><p>The blame information for the given file at the given commit</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>list: [git.Commit, list: [<line>]] -A list of tuples associating a Commit object with a list of lines that -changed within the given commit. The Commit objects will be given in order -of appearance.</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.blob.Blob.data"> -<tt class="descname">data</tt><a class="headerlink" href="#git.blob.Blob.data" title="Permalink to this definition">¶</a></dt> -<dd><p>The binary contents of this blob.</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>str</dd> -<dt>NOTE</dt> -<dd>The data will be cached after the first access.</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.blob.Blob.mime_type"> -<tt class="descname">mime_type</tt><a class="headerlink" href="#git.blob.Blob.mime_type" title="Permalink to this definition">¶</a></dt> -<dd><p>The mime type of this file (based on the filename)</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>str</dd> -<dt>NOTE</dt> -<dd>Defaults to ‘text/plain’ in case the actual file type is unknown.</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.blob.Blob.size"> -<tt class="descname">size</tt><a class="headerlink" href="#git.blob.Blob.size" title="Permalink to this definition">¶</a></dt> -<dd><p>The size of this blob in bytes</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>int</dd> -<dt>NOTE</dt> -<dd>The size will be cached after the first access</dd> -</dl> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.cmd"> -<h2>Git<a class="headerlink" href="#module-git.cmd" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.cmd.Git"> -<em class="property">class </em><tt class="descclassname">git.cmd.</tt><tt class="descname">Git</tt><big>(</big><em>git_dir=None</em><big>)</big><a class="headerlink" href="#git.cmd.Git" title="Permalink to this definition">¶</a></dt> -<dd><p>The Git class manages communication with the Git binary.</p> -<blockquote> -<p>It provides a convenient interface to calling the Git binary, such as in:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="n">g</span> <span class="o">=</span> <span class="n">Git</span><span class="p">(</span> <span class="n">git_dir</span> <span class="p">)</span> -<span class="n">g</span><span class="o">.</span><span class="n">init</span><span class="p">()</span> <span class="c"># calls 'git init' program</span> -<span class="n">rval</span> <span class="o">=</span> <span class="n">g</span><span class="o">.</span><span class="n">ls_files</span><span class="p">()</span> <span class="c"># calls 'git ls-files' program</span> -</pre></div> -</div> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">Debugging</span></tt></dt> -<dd>Set the GIT_PYTHON_TRACE environment variable print each invocation -of the command to stdout. -Set its value to ‘full’ to see details about the returned values.</dd> -</dl> -</blockquote> -<dl class="method"> -<dt id="git.cmd.Git.execute"> -<tt class="descname">execute</tt><big>(</big><em>command</em>, <em>istream=None</em>, <em>with_keep_cwd=False</em>, <em>with_extended_output=False</em>, <em>with_exceptions=True</em>, <em>with_raw_output=False</em><big>)</big><a class="headerlink" href="#git.cmd.Git.execute" title="Permalink to this definition">¶</a></dt> -<dd><p>Handles executing the command on the shell and consumes and returns -the returned information (stdout)</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">command</span></tt></dt> -<dd>The command argument list to execute. -It should be a string, or a sequence of program arguments. The -program to execute is the first item in the args sequence or string.</dd> -<dt><tt class="docutils literal"><span class="pre">istream</span></tt></dt> -<dd>Standard input filehandle passed to subprocess.Popen.</dd> -<dt><tt class="docutils literal"><span class="pre">with_keep_cwd</span></tt></dt> -<dd>Whether to use the current working directory from os.getcwd(). -GitPython uses get_work_tree() as its working directory by -default and get_git_dir() for bare repositories.</dd> -<dt><tt class="docutils literal"><span class="pre">with_extended_output</span></tt></dt> -<dd>Whether to return a (status, stdout, stderr) tuple.</dd> -<dt><tt class="docutils literal"><span class="pre">with_exceptions</span></tt></dt> -<dd>Whether to raise an exception when git returns a non-zero status.</dd> -<dt><tt class="docutils literal"><span class="pre">with_raw_output</span></tt></dt> -<dd>Whether to avoid stripping off trailing whitespace.</dd> -</dl> -<p>Returns:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="nb">str</span><span class="p">(</span><span class="n">output</span><span class="p">)</span> <span class="c"># extended_output = False (Default)</span> -<span class="nb">tuple</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">status</span><span class="p">),</span> <span class="nb">str</span><span class="p">(</span><span class="n">stdout</span><span class="p">),</span> <span class="nb">str</span><span class="p">(</span><span class="n">stderr</span><span class="p">))</span> <span class="c"># extended_output = True</span> -</pre></div> -</div> -<dl class="docutils"> -<dt>Raise</dt> -<dd>GitCommandError</dd> -<dt>NOTE</dt> -<dd>If you add additional keyword arguments to the signature of this method, -you must update the execute_kwargs tuple housed in this module.</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.cmd.Git.get_dir"> -<tt class="descname">get_dir</tt><a class="headerlink" href="#git.cmd.Git.get_dir" title="Permalink to this definition">¶</a></dt> -<dd><dl class="docutils"> -<dt>Returns</dt> -<dd>Git directory we are working on</dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.cmd.Git.transform_kwargs"> -<tt class="descname">transform_kwargs</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#git.cmd.Git.transform_kwargs" title="Permalink to this definition">¶</a></dt> -<dd>Transforms Python style kwargs into git command line options.</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.commit"> -<h2>Commit<a class="headerlink" href="#module-git.commit" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.commit.Commit"> -<em class="property">class </em><tt class="descclassname">git.commit.</tt><tt class="descname">Commit</tt><big>(</big><em>repo</em>, <em>id</em>, <em>tree=None</em>, <em>author=None</em>, <em>authored_date=None</em>, <em>committer=None</em>, <em>committed_date=None</em>, <em>message=None</em>, <em>parents=None</em><big>)</big><a class="headerlink" href="#git.commit.Commit" title="Permalink to this definition">¶</a></dt> -<dd><p>Wraps a git Commit object.</p> -<p>This class will act lazily on some of its attributes and will query the -value on demand only if it involves calling the git binary.</p> -<dl class="classmethod"> -<dt id="git.commit.Commit.actor"> -<em class="property">classmethod </em><tt class="descname">actor</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#git.commit.Commit.actor" title="Permalink to this definition">¶</a></dt> -<dd><p>Parse out the actor (author or committer) info</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>[Actor, gmtime(acted at time)]</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.commit.Commit.count"> -<em class="property">classmethod </em><tt class="descname">count</tt><big>(</big><em>repo</em>, <em>ref</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#git.commit.Commit.count" title="Permalink to this definition">¶</a></dt> -<dd><p>Count the number of commits reachable from this ref</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">ref</span></tt></dt> -<dd>is the ref from which to begin (SHA1 or name)</dd> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is an optional path</dd> -<dt>Returns</dt> -<dd>int</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.commit.Commit.diff"> -<em class="property">classmethod </em><tt class="descname">diff</tt><big>(</big><em>repo</em>, <em>a</em>, <em>b=None</em>, <em>paths=None</em><big>)</big><a class="headerlink" href="#git.commit.Commit.diff" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates diffs between a tree and the index or between two trees:</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">a</span></tt></dt> -<dd>is a named commit</dd> -<dt><tt class="docutils literal"><span class="pre">b</span></tt></dt> -<dd>is an optional named commit. Passing a list assumes you -wish to omit the second named commit and limit the diff to the -given paths.</dd> -<dt><tt class="docutils literal"><span class="pre">paths</span></tt></dt> -<dd>is a list of paths to limit the diff to.</dd> -<dt>Returns</dt> -<dd><p class="first">git.Diff[]:</p> -<div class="last highlight-python"><pre>between tree and the index if only a is given -between two trees if a and b are given and are commits</pre> -</div> -</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.commit.Commit.diffs"> -<tt class="descname">diffs</tt><a class="headerlink" href="#git.commit.Commit.diffs" title="Permalink to this definition">¶</a></dt> -<dd><dl class="docutils"> -<dt>Returns</dt> -<dd>git.Diff[] -Diffs between this commit and its first parent or all changes if this -commit is the first commit and has no parent.</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.commit.Commit.find_all"> -<em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>repo</em>, <em>ref</em>, <em>path=''</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.commit.Commit.find_all" title="Permalink to this definition">¶</a></dt> -<dd><p>Find all commits matching the given criteria. -<tt class="docutils literal"><span class="pre">repo</span></tt></p> -<blockquote> -is the Repo</blockquote> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">ref</span></tt></dt> -<dd>is the ref from which to begin (SHA1 or name)</dd> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is an optinal path, if set only Commits that include the path -will be considered</dd> -<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> -<dd>optional keyword arguments to git where -<tt class="docutils literal"><span class="pre">max_count</span></tt> is the maximum number of commits to fetch -<tt class="docutils literal"><span class="pre">skip</span></tt> is the number of commits to skip</dd> -<dt>Returns</dt> -<dd>git.Commit[]</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.commit.Commit.id_abbrev"> -<tt class="descname">id_abbrev</tt><a class="headerlink" href="#git.commit.Commit.id_abbrev" title="Permalink to this definition">¶</a></dt> -<dd><dl class="docutils"> -<dt>Returns</dt> -<dd>First 7 bytes of the commit’s sha id as an abbreviation of the full string.</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.commit.Commit.list_from_string"> -<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.commit.Commit.list_from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Parse out commit information into a list of Commit objects</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> -<dd>is the text output from the git-rev-list command (raw format)</dd> -<dt>Returns</dt> -<dd>git.Commit[]</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.commit.Commit.stats"> -<tt class="descname">stats</tt><a class="headerlink" href="#git.commit.Commit.stats" title="Permalink to this definition">¶</a></dt> -<dd><p>Create a git stat from changes between this commit and its first parent -or from all changes done if this is the very first commit.</p> -<dl class="docutils"> -<dt>Return</dt> -<dd>git.Stats</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.commit.Commit.summary"> -<tt class="descname">summary</tt><a class="headerlink" href="#git.commit.Commit.summary" title="Permalink to this definition">¶</a></dt> -<dd><dl class="docutils"> -<dt>Returns</dt> -<dd>First line of the commit message.</dd> -</dl> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.diff"> -<h2>Diff<a class="headerlink" href="#module-git.diff" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.diff.Diff"> -<em class="property">class </em><tt class="descclassname">git.diff.</tt><tt class="descname">Diff</tt><big>(</big><em>repo</em>, <em>a_path</em>, <em>b_path</em>, <em>a_commit</em>, <em>b_commit</em>, <em>a_mode</em>, <em>b_mode</em>, <em>new_file</em>, <em>deleted_file</em>, <em>rename_from</em>, <em>rename_to</em>, <em>diff</em><big>)</big><a class="headerlink" href="#git.diff.Diff" title="Permalink to this definition">¶</a></dt> -<dd><p>A Diff contains diff information between two commits.</p> -<dl class="classmethod"> -<dt id="git.diff.Diff.list_from_string"> -<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.diff.Diff.list_from_string" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.errors"> -<h2>Errors<a class="headerlink" href="#module-git.errors" title="Permalink to this headline">¶</a></h2> -<p>Module containing all exceptions thrown througout the git package,</p> -<dl class="exception"> -<dt id="git.errors.GitCommandError"> -<em class="property">exception </em><tt class="descclassname">git.errors.</tt><tt class="descname">GitCommandError</tt><big>(</big><em>command</em>, <em>status</em>, <em>stderr=None</em><big>)</big><a class="headerlink" href="#git.errors.GitCommandError" title="Permalink to this definition">¶</a></dt> -<dd>Thrown if execution of the git command fails with non-zero status code.</dd></dl> - -<dl class="exception"> -<dt id="git.errors.InvalidGitRepositoryError"> -<em class="property">exception </em><tt class="descclassname">git.errors.</tt><tt class="descname">InvalidGitRepositoryError</tt><a class="headerlink" href="#git.errors.InvalidGitRepositoryError" title="Permalink to this definition">¶</a></dt> -<dd>Thrown if the given repository appears to have an invalid format.</dd></dl> - -<dl class="exception"> -<dt id="git.errors.NoSuchPathError"> -<em class="property">exception </em><tt class="descclassname">git.errors.</tt><tt class="descname">NoSuchPathError</tt><a class="headerlink" href="#git.errors.NoSuchPathError" title="Permalink to this definition">¶</a></dt> -<dd>Thrown if a path could not be access by the system.</dd></dl> - -</div> -<div class="section" id="module-git.head"> -<h2>Head<a class="headerlink" href="#module-git.head" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.head.Head"> -<em class="property">class </em><tt class="descclassname">git.head.</tt><tt class="descname">Head</tt><big>(</big><em>name</em>, <em>commit</em><big>)</big><a class="headerlink" href="#git.head.Head" title="Permalink to this definition">¶</a></dt> -<dd><p>A Head is a named reference to a Commit. Every Head instance contains a name -and a Commit object.</p> -<p>Examples:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s">"/path/to/repo"</span><span class="p">)</span> -<span class="gp">>>> </span><span class="n">head</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span> - -<span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">name</span> -<span class="go">'master'</span> - -<span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span> -<span class="go"><git.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455"></span> - -<span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">id</span> -<span class="go">'1c09f116cbc2cb4100fb6935bb162daa4723f455'</span> -</pre></div> -</div> -<dl class="classmethod"> -<dt id="git.head.Head.find_all"> -<em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>repo</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.head.Head.find_all" title="Permalink to this definition">¶</a></dt> -<dd><p>Find all Heads in the repository</p> -<dl class="docutils"> -<dt><cite>repo</cite></dt> -<dd>is the Repo</dd> -<dt><cite>kwargs</cite></dt> -<dd>Additional options given as keyword arguments, will be passed -to git-for-each-ref</dd> -<dt>Returns</dt> -<dd><p class="first">git.Head[]</p> -<p class="last">List is sorted by committerdate</p> -</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.head.Head.from_string"> -<em class="property">classmethod </em><tt class="descname">from_string</tt><big>(</big><em>repo</em>, <em>line</em><big>)</big><a class="headerlink" href="#git.head.Head.from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Create a new Head instance from the given string.</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">line</span></tt></dt> -<dd>is the formatted head information</dd> -</dl> -<p>Format:</p> -<div class="highlight-python"><pre>name: [a-zA-Z_/]+ -<null byte> -id: [0-9A-Fa-f]{40}</pre> -</div> -<dl class="docutils"> -<dt>Returns</dt> -<dd>git.Head</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.head.Head.list_from_string"> -<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.head.Head.list_from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Parse out head information into a list of head objects</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> -<dd>is the text output from the git-for-each-ref command</dd> -<dt>Returns</dt> -<dd>git.Head[]</dd> -</dl> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.lazy"> -<h2>Lazy<a class="headerlink" href="#module-git.lazy" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.lazy.LazyMixin"> -<em class="property">class </em><tt class="descclassname">git.lazy.</tt><tt class="descname">LazyMixin</tt><a class="headerlink" href="#git.lazy.LazyMixin" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -</div> -<div class="section" id="module-git.repo"> -<h2>Repo<a class="headerlink" href="#module-git.repo" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.repo.Repo"> -<em class="property">class </em><tt class="descclassname">git.repo.</tt><tt class="descname">Repo</tt><big>(</big><em>path=None</em><big>)</big><a class="headerlink" href="#git.repo.Repo" title="Permalink to this definition">¶</a></dt> -<dd><p>Represents a git repository and allows you to query references, -gather commit information, generate diffs, create and clone repositories query -the log.</p> -<dl class="attribute"> -<dt id="git.repo.Repo.active_branch"> -<tt class="descname">active_branch</tt><a class="headerlink" href="#git.repo.Repo.active_branch" title="Permalink to this definition">¶</a></dt> -<dd><p>The name of the currently active branch.</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>str (the branch name)</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.repo.Repo.alternates"> -<tt class="descname">alternates</tt><a class="headerlink" href="#git.repo.Repo.alternates" title="Permalink to this definition">¶</a></dt> -<dd>Retrieve a list of alternates paths or set a list paths to be used as alternates</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.archive_tar"> -<tt class="descname">archive_tar</tt><big>(</big><em>treeish='master'</em>, <em>prefix=None</em><big>)</big><a class="headerlink" href="#git.repo.Repo.archive_tar" title="Permalink to this definition">¶</a></dt> -<dd><p>Archive the given treeish</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">treeish</span></tt></dt> -<dd>is the treeish name/id (default ‘master’)</dd> -<dt><tt class="docutils literal"><span class="pre">prefix</span></tt></dt> -<dd>is the optional prefix to prepend to each filename in the archive</dd> -</dl> -<p>Examples:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar</span> -<span class="go"><String containing tar archive></span> - -<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar</span><span class="p">(</span><span class="s">'a87ff14'</span><span class="p">)</span> -<span class="go"><String containing tar archive for commit a87ff14></span> - -<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="s">'myproject/'</span><span class="p">)</span> -<span class="go"><String containing tar bytes archive, whose files are prefixed with 'myproject/'></span> -</pre></div> -</div> -<dl class="docutils"> -<dt>Returns</dt> -<dd>str (containing bytes of tar archive)</dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.archive_tar_gz"> -<tt class="descname">archive_tar_gz</tt><big>(</big><em>treeish='master'</em>, <em>prefix=None</em><big>)</big><a class="headerlink" href="#git.repo.Repo.archive_tar_gz" title="Permalink to this definition">¶</a></dt> -<dd><p>Archive and gzip the given treeish</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">treeish</span></tt></dt> -<dd>is the treeish name/id (default ‘master’)</dd> -<dt><tt class="docutils literal"><span class="pre">prefix</span></tt></dt> -<dd>is the optional prefix to prepend to each filename in the archive</dd> -</dl> -<p>Examples:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar_gz</span> -<span class="go"><String containing tar.gz archive></span> - -<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar_gz</span><span class="p">(</span><span class="s">'a87ff14'</span><span class="p">)</span> -<span class="go"><String containing tar.gz archive for commit a87ff14></span> - -<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar_gz</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="s">'myproject/'</span><span class="p">)</span> -<span class="go"><String containing tar.gz archive and prefixed with 'myproject/'></span> -</pre></div> -</div> -<dl class="docutils"> -<dt>Returns</dt> -<dd>str (containing the bytes of tar.gz archive)</dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.blob"> -<tt class="descname">blob</tt><big>(</big><em>id</em><big>)</big><a class="headerlink" href="#git.repo.Repo.blob" title="Permalink to this definition">¶</a></dt> -<dd><p>The Blob object for the given id</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">id</span></tt></dt> -<dd>is the SHA1 id of the blob</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Blob</span></tt></dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.repo.Repo.branches"> -<tt class="descname">branches</tt><a class="headerlink" href="#git.repo.Repo.branches" title="Permalink to this definition">¶</a></dt> -<dd><p>A list of <tt class="docutils literal"><span class="pre">Head</span></tt> objects representing the branch heads in -this repo</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Head[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.commit"> -<tt class="descname">commit</tt><big>(</big><em>id</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit" title="Permalink to this definition">¶</a></dt> -<dd><p>The Commit object for the specified id</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">id</span></tt></dt> -<dd>is the SHA1 identifier of the commit</dd> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is an optional path, if set the returned commit must contain the path.</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Commit</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.commit_count"> -<tt class="descname">commit_count</tt><big>(</big><em>start='master'</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit_count" title="Permalink to this definition">¶</a></dt> -<dd><p>The number of commits reachable by the given branch/commit</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">start</span></tt></dt> -<dd>is the branch/commit name (default ‘master’)</dd> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is an optional path -Commits that do not contain the path will not contribute to the count.</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">int</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.commit_deltas_from"> -<tt class="descname">commit_deltas_from</tt><big>(</big><em>other_repo</em>, <em>ref='master'</em>, <em>other_ref='master'</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit_deltas_from" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns a list of commits that is in <tt class="docutils literal"><span class="pre">other_repo</span></tt> but not in self</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>git.Commit[]</dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.commit_diff"> -<tt class="descname">commit_diff</tt><big>(</big><em>commit</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit_diff" title="Permalink to this definition">¶</a></dt> -<dd><dl class="docutils"> -<dt>The commit diff for the given commit</dt> -<dd><tt class="docutils literal"><span class="pre">commit</span></tt> is the commit name/id</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Diff[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.commits"> -<tt class="descname">commits</tt><big>(</big><em>start='master'</em>, <em>path=''</em>, <em>max_count=10</em>, <em>skip=0</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commits" title="Permalink to this definition">¶</a></dt> -<dd><p>A list of Commit objects representing the history of a given ref/commit</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">start</span></tt></dt> -<dd><blockquote class="first"> -is the branch/commit name (default ‘master’)</blockquote> -<dl class="last docutils"> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is an optional path to limit the returned commits to -Commits that do not contain that path will not be returned.</dd> -<dt><tt class="docutils literal"><span class="pre">max_count</span></tt></dt> -<dd><blockquote class="first"> -is the maximum number of commits to return (default 10)</blockquote> -<dl class="last docutils"> -<dt><tt class="docutils literal"><span class="pre">skip</span></tt></dt> -<dd>is the number of commits to skip (default 0) which will effectively -move your commit-window by the given number.</dd> -</dl> -</dd> -</dl> -</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.commits_between"> -<tt class="descname">commits_between</tt><big>(</big><em>frm</em>, <em>to</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commits_between" title="Permalink to this definition">¶</a></dt> -<dd><p>The Commits objects that are reachable via <tt class="docutils literal"><span class="pre">to</span></tt> but not via <tt class="docutils literal"><span class="pre">frm</span></tt> -Commits are returned in chronological order.</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">from</span></tt></dt> -<dd>is the branch/commit name of the younger item</dd> -<dt><tt class="docutils literal"><span class="pre">to</span></tt></dt> -<dd>is the branch/commit name of the older item</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.commits_since"> -<tt class="descname">commits_since</tt><big>(</big><em>start='master'</em>, <em>path=''</em>, <em>since='1970-01-01'</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commits_since" title="Permalink to this definition">¶</a></dt> -<dd><p>The Commits objects that are newer than the specified date. -Commits are returned in chronological order.</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">start</span></tt></dt> -<dd>is the branch/commit name (default ‘master’)</dd> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is an optional path to limit the returned commits to.</dd> -<dt><tt class="docutils literal"><span class="pre">since</span></tt></dt> -<dd>is a string representing a date/time</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.repo.Repo.create"> -<em class="property">classmethod </em><tt class="descname">create</tt><big>(</big><em>path</em>, <em>mkdir=True</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.create" title="Permalink to this definition">¶</a></dt> -<dd><p>Initialize a bare git repository at the given path</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is the full path to the repo (traditionally ends with /<name>.git)</dd> -<dt><tt class="docutils literal"><span class="pre">mkdir</span></tt></dt> -<dd>if specified will create the repository directory if it doesn’t -already exists. Creates the directory with a mode=0755.</dd> -<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> -<dd>keyword arguments serving as additional options to the git init command</dd> -</dl> -<p>Examples:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="n">git</span><span class="o">.</span><span class="n">Repo</span><span class="o">.</span><span class="n">init_bare</span><span class="p">(</span><span class="s">'/var/git/myrepo.git'</span><span class="p">)</span> -</pre></div> -</div> -<dl class="docutils"> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Repo</span></tt> (the newly created repo)</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.repo.Repo.daemon_export"> -<tt class="descname">daemon_export</tt><a class="headerlink" href="#git.repo.Repo.daemon_export" title="Permalink to this definition">¶</a></dt> -<dd>If True, git-daemon may export this repository</dd></dl> - -<dl class="attribute"> -<dt id="git.repo.Repo.description"> -<tt class="descname">description</tt><a class="headerlink" href="#git.repo.Repo.description" title="Permalink to this definition">¶</a></dt> -<dd>the project’s description</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.diff"> -<tt class="descname">diff</tt><big>(</big><em>a</em>, <em>b</em>, <em>*paths</em><big>)</big><a class="headerlink" href="#git.repo.Repo.diff" title="Permalink to this definition">¶</a></dt> -<dd><p>The diff from commit <tt class="docutils literal"><span class="pre">a</span></tt> to commit <tt class="docutils literal"><span class="pre">b</span></tt>, optionally restricted to the given file(s)</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">a</span></tt></dt> -<dd>is the base commit</dd> -<dt><tt class="docutils literal"><span class="pre">b</span></tt></dt> -<dd>is the other commit</dd> -<dt><tt class="docutils literal"><span class="pre">paths</span></tt></dt> -<dd>is an optional list of file paths on which to restrict the diff</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">str</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.fork_bare"> -<tt class="descname">fork_bare</tt><big>(</big><em>path</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.fork_bare" title="Permalink to this definition">¶</a></dt> -<dd><p>Fork a bare git repository from this repo</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is the full path of the new repo (traditionally ends with /<name>.git)</dd> -<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> -<dd>keyword arguments to be given to the git clone command</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Repo</span></tt> (the newly forked repo)</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.repo.Repo.heads"> -<tt class="descname">heads</tt><a class="headerlink" href="#git.repo.Repo.heads" title="Permalink to this definition">¶</a></dt> -<dd><p>A list of <tt class="docutils literal"><span class="pre">Head</span></tt> objects representing the branch heads in -this repo</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Head[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.repo.Repo.init_bare"> -<em class="property">classmethod </em><tt class="descname">init_bare</tt><big>(</big><em>path</em>, <em>mkdir=True</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.init_bare" title="Permalink to this definition">¶</a></dt> -<dd><p>Initialize a bare git repository at the given path</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> -<dd>is the full path to the repo (traditionally ends with /<name>.git)</dd> -<dt><tt class="docutils literal"><span class="pre">mkdir</span></tt></dt> -<dd>if specified will create the repository directory if it doesn’t -already exists. Creates the directory with a mode=0755.</dd> -<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> -<dd>keyword arguments serving as additional options to the git init command</dd> -</dl> -<p>Examples:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="n">git</span><span class="o">.</span><span class="n">Repo</span><span class="o">.</span><span class="n">init_bare</span><span class="p">(</span><span class="s">'/var/git/myrepo.git'</span><span class="p">)</span> -</pre></div> -</div> -<dl class="docutils"> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Repo</span></tt> (the newly created repo)</dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.repo.Repo.is_dirty"> -<tt class="descname">is_dirty</tt><a class="headerlink" href="#git.repo.Repo.is_dirty" title="Permalink to this definition">¶</a></dt> -<dd><p>Return the status of the index.</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd><tt class="xref docutils literal"><span class="pre">True</span></tt>, if the index has any uncommitted changes, -otherwise <tt class="xref docutils literal"><span class="pre">False</span></tt></dd> -<dt>NOTE</dt> -<dd>Working tree changes that have not been staged will not be detected !</dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.log"> -<tt class="descname">log</tt><big>(</big><em>commit='master'</em>, <em>path=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.log" title="Permalink to this definition">¶</a></dt> -<dd><p>The Commit for a treeish, and all commits leading to it.</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> -<dd>keyword arguments specifying flags to be used in git-log command, -i.e.: max_count=1 to limit the amount of commits returned</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="attribute"> -<dt id="git.repo.Repo.tags"> -<tt class="descname">tags</tt><a class="headerlink" href="#git.repo.Repo.tags" title="Permalink to this definition">¶</a></dt> -<dd><p>A list of <tt class="docutils literal"><span class="pre">Tag</span></tt> objects that are available in this repo</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Tag[]</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.repo.Repo.tree"> -<tt class="descname">tree</tt><big>(</big><em>treeish='master'</em><big>)</big><a class="headerlink" href="#git.repo.Repo.tree" title="Permalink to this definition">¶</a></dt> -<dd><p>The Tree object for the given treeish reference</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">treeish</span></tt></dt> -<dd>is the reference (default ‘master’)</dd> -</dl> -<p>Examples:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="s">'master'</span><span class="p">)</span> -</pre></div> -</div> -<dl class="docutils"> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Tree</span></tt></dd> -</dl> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.stats"> -<h2>Stats<a class="headerlink" href="#module-git.stats" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.stats.Stats"> -<em class="property">class </em><tt class="descclassname">git.stats.</tt><tt class="descname">Stats</tt><big>(</big><em>repo</em>, <em>total</em>, <em>files</em><big>)</big><a class="headerlink" href="#git.stats.Stats" title="Permalink to this definition">¶</a></dt> -<dd><p>Represents stat information as presented by git at the end of a merge. It is -created from the output of a diff operation.</p> -<p><tt class="docutils literal"><span class="pre">Example</span></tt>:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="n">c</span> <span class="o">=</span> <span class="n">Commit</span><span class="p">(</span> <span class="n">sha1</span> <span class="p">)</span> -<span class="n">s</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">stats</span> -<span class="n">s</span><span class="o">.</span><span class="n">total</span> <span class="c"># full-stat-dict</span> -<span class="n">s</span><span class="o">.</span><span class="n">files</span> <span class="c"># dict( filepath : stat-dict )</span> -</pre></div> -</div> -<p><tt class="docutils literal"><span class="pre">stat-dict</span></tt></p> -<p>A dictionary with the following keys and values:</p> -<div class="highlight-python"><pre>deletions = number of deleted lines as int -insertions = number of inserted lines as int -lines = total number of lines changed as int, or deletions + insertions</pre> -</div> -<p><tt class="docutils literal"><span class="pre">full-stat-dict</span></tt></p> -<p>In addition to the items in the stat-dict, it features additional information:</p> -<div class="highlight-python"><pre>files = number of changed files as int</pre> -</div> -<dl class="classmethod"> -<dt id="git.stats.Stats.list_from_string"> -<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.stats.Stats.list_from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Create a Stat object from output retrieved by git-diff.</p> -<dl class="docutils"> -<dt>Returns</dt> -<dd>git.Stat</dd> -</dl> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.tag"> -<h2>Tag<a class="headerlink" href="#module-git.tag" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.tag.Tag"> -<em class="property">class </em><tt class="descclassname">git.tag.</tt><tt class="descname">Tag</tt><big>(</big><em>name</em>, <em>commit</em><big>)</big><a class="headerlink" href="#git.tag.Tag" title="Permalink to this definition">¶</a></dt> -<dd><dl class="classmethod"> -<dt id="git.tag.Tag.find_all"> -<em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>repo</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.tag.Tag.find_all" title="Permalink to this definition">¶</a></dt> -<dd><p>Find all Tags in the repository</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> -<dd>Additional options given as keyword arguments, will be passed -to git-for-each-ref</dd> -<dt>Returns</dt> -<dd><p class="first"><tt class="docutils literal"><span class="pre">git.Tag[]</span></tt></p> -<p class="last">List is sorted by committerdate</p> -</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.tag.Tag.from_string"> -<em class="property">classmethod </em><tt class="descname">from_string</tt><big>(</big><em>repo</em>, <em>line</em><big>)</big><a class="headerlink" href="#git.tag.Tag.from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Create a new Tag instance from the given string.</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">line</span></tt></dt> -<dd>is the formatted tag information</dd> -</dl> -<p>Format:</p> -<div class="highlight-python"><pre>name: [a-zA-Z_/]+ -<null byte> -id: [0-9A-Fa-f]{40}</pre> -</div> -<dl class="docutils"> -<dt>Returns</dt> -<dd>git.Tag</dd> -</dl> -</dd></dl> - -<dl class="classmethod"> -<dt id="git.tag.Tag.list_from_string"> -<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.tag.Tag.list_from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Parse out tag information into an array of Tag objects</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd>is the Repo</dd> -<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> -<dd>is the text output from the git-for-each command</dd> -<dt>Returns</dt> -<dd>git.Tag[]</dd> -</dl> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.tree"> -<h2>Tree<a class="headerlink" href="#module-git.tree" title="Permalink to this headline">¶</a></h2> -<dl class="class"> -<dt id="git.tree.Tree"> -<em class="property">class </em><tt class="descclassname">git.tree.</tt><tt class="descname">Tree</tt><big>(</big><em>repo</em>, <em>id</em>, <em>mode=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#git.tree.Tree" title="Permalink to this definition">¶</a></dt> -<dd><dl class="attribute"> -<dt id="git.tree.Tree.basename"> -<tt class="descname">basename</tt><a class="headerlink" href="#git.tree.Tree.basename" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="staticmethod"> -<dt id="git.tree.Tree.content_from_string"> -<em class="property">static </em><tt class="descname">content_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.tree.Tree.content_from_string" title="Permalink to this definition">¶</a></dt> -<dd><p>Parse a content item and create the appropriate object</p> -<dl class="docutils"> -<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> -<dd><blockquote class="first"> -is the Repo</blockquote> -<dl class="last docutils"> -<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> -<dd>is the single line containing the items data in <cite>git ls-tree</cite> format</dd> -</dl> -</dd> -<dt>Returns</dt> -<dd><tt class="docutils literal"><span class="pre">git.Blob</span></tt> or <tt class="docutils literal"><span class="pre">git.Tree</span></tt></dd> -</dl> -</dd></dl> - -<dl class="method"> -<dt id="git.tree.Tree.get"> -<tt class="descname">get</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#git.tree.Tree.get" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="git.tree.Tree.items"> -<tt class="descname">items</tt><big>(</big><big>)</big><a class="headerlink" href="#git.tree.Tree.items" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="git.tree.Tree.keys"> -<tt class="descname">keys</tt><big>(</big><big>)</big><a class="headerlink" href="#git.tree.Tree.keys" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="git.tree.Tree.values"> -<tt class="descname">values</tt><big>(</big><big>)</big><a class="headerlink" href="#git.tree.Tree.values" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -</dd></dl> - -</div> -<div class="section" id="module-git.utils"> -<h2>Utils<a class="headerlink" href="#module-git.utils" title="Permalink to this headline">¶</a></h2> -<dl class="function"> -<dt id="git.utils.dashify"> -<tt class="descclassname">git.utils.</tt><tt class="descname">dashify</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#git.utils.dashify" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="function"> -<dt id="git.utils.is_git_dir"> -<tt class="descclassname">git.utils.</tt><tt class="descname">is_git_dir</tt><big>(</big><em>d</em><big>)</big><a class="headerlink" href="#git.utils.is_git_dir" title="Permalink to this definition">¶</a></dt> -<dd>This is taken from the git setup.c:is_git_directory -function.</dd></dl> - -<dl class="function"> -<dt id="git.utils.touch"> -<tt class="descclassname">git.utils.</tt><tt class="descname">touch</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#git.utils.touch" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference external" href="#">API Reference</a><ul> -<li><a class="reference external" href="#module-git.actor">Actor</a></li> -<li><a class="reference external" href="#module-git.blob">Blob</a></li> -<li><a class="reference external" href="#module-git.cmd">Git</a></li> -<li><a class="reference external" href="#module-git.commit">Commit</a></li> -<li><a class="reference external" href="#module-git.diff">Diff</a></li> -<li><a class="reference external" href="#module-git.errors">Errors</a></li> -<li><a class="reference external" href="#module-git.head">Head</a></li> -<li><a class="reference external" href="#module-git.lazy">Lazy</a></li> -<li><a class="reference external" href="#module-git.repo">Repo</a></li> -<li><a class="reference external" href="#module-git.stats">Stats</a></li> -<li><a class="reference external" href="#module-git.tag">Tag</a></li> -<li><a class="reference external" href="#module-git.tree">Tree</a></li> -<li><a class="reference external" href="#module-git.utils">Utils</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="tutorial.html" - title="previous chapter">GitPython Tutorial</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/reference.txt" - rel="nofollow">Show Source</a></li> - </ul> - <div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> - </div> - <script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="modindex.html" title="Global Module Index" - >modules</a> |</li> - <li class="right" > - <a href="tutorial.html" title="GitPython Tutorial" - >previous</a> |</li> - <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. - </div> - </body> -</html>
\ No newline at end of file |