From b00f3689aa19938c10576580fbfc9243d9f3866c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steve=20Fr=C3=A9cinaux?= Date: Tue, 16 Sep 2008 08:08:47 +0200 Subject: Replace GitPython with git in repr() outputs. The imported module is called git (as in "import git"), so it's less confusing to do so than to call everything GitPython.something. --- doc/tutorial.txt | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'doc/tutorial.txt') diff --git a/doc/tutorial.txt b/doc/tutorial.txt index 42e015b6..26cdf1af 100644 --- a/doc/tutorial.txt +++ b/doc/tutorial.txt @@ -27,10 +27,10 @@ From the ``Repo`` object, you can get a list of ``Commit`` objects. >>> repo.commits() - [, - , - , - ] + [, + , + , + ] Called without arguments, ``Repo.commits`` returns a list of up to ten commits reachable by the master branch (starting at the latest commit). You can ask @@ -61,19 +61,19 @@ Commit objects contain information about a specific commit. '207c0c4418115df0d30820ab1a9acd2ea4bf4431' >>> head.parents - [] + [] >>> head.tree - + >>> head.author - "> + "> >>> head.authored_date (2008, 5, 7, 5, 0, 56, 2, 128, 0) >>> head.committer - "> + "> >>> head.committed_date (2008, 5, 7, 5, 0, 56, 2, 128, 0) @@ -107,7 +107,7 @@ A tree records pointers to the contents of a directory. Let's say you want the root tree of the latest commit on the master branch. >>> tree = repo.commits()[0].tree - + >>> tree.id 'a006b5b1a8115185a228b7514cdcd46fed90dc92' @@ -115,17 +115,17 @@ the root tree of the latest commit on the master branch. Once you have a tree, you can get the contents. >>> contents = tree.contents - [, - , - , - ] + [, + , + , + ] This tree contains three ``Blob`` objects and one ``Tree`` object. The trees are subdirectories and the blobs are files. Trees below the root have additional attributes. >>> contents = tree["lib"] - + >>> contents.name 'test' @@ -138,15 +138,15 @@ from a tree with a syntax similar to how paths are written in an unix system. >>> tree/"lib" - + You can also get a tree directly from the repository if you know its name. >>> repo.tree() - + >>> repo.tree("c1c7214dde86f76bc3e18806ac1f47c38b2b7a30") - + The Blob object *************** @@ -154,7 +154,7 @@ The Blob object A blob represents a file. Trees often contain blobs. >>> blob = tree.contents[-1] - + A blob has certain attributes. @@ -178,7 +178,7 @@ You can get the data of a blob as a string. You can also get a blob directly from the repo if you know its name. >>> repo.blob("b19574431a073333ea09346eafd64e7b1908ef49") - + What Else? ********** -- cgit v1.2.3