| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,3 +5,4 @@ David Aguilar <davvid _at_ gmail.com> | |||
| 5 | 5 | Jelmer Vernooij <jelmer _at_ samba.org> | |
| 6 | 6 | Steve Frécinaux <code _at_ istique.net> | |
| 7 | 7 | Kai Lautaportti <kai _at_ lautaportti.fi> | |
| 8 | + Paul Sowden <paul _at_ idontsmoke.co.uk> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,9 +13,9 @@ The first step is to create a ``Repo`` object to represent your repository. | |||
| 13 | 13 | ||
| 14 | 14 | >>> from git import * | |
| 15 | 15 | >>> repo = Repo("/Users/mtrier/Development/git-python") | |
| 16 | - | ||
| 17 | - In the above example, the directory ``/Users/mtrier/Development/git-python`` | ||
| 18 | - is my working repository and contains the ``.git`` directory. You can also | ||
| 16 | + | ||
| 17 | + In the above example, the directory ``/Users/mtrier/Development/git-python`` | ||
| 18 | + is my working repository and contains the ``.git`` directory. You can also | ||
| 19 | 19 | initialize GitPython with a bare repository. | |
| 20 | 20 | ||
| 21 | 21 | >>> repo = Repo.create("/var/git/git-python.git") | |
@@ -42,14 +42,14 @@ for commits beginning at a different branch, commit, tag, etc. | |||
| 42 | 42 | ||
| 43 | 43 | You can specify the maximum number of commits to return. | |
| 44 | 44 | ||
| 45 | - >>> repo.commits('master', 100) | ||
| 46 | - | ||
| 45 | + >>> repo.commits('master', max_count=100) | ||
| 46 | + | ||
| 47 | 47 | If you need paging, you can specify a number of commits to skip. | |
| 48 | 48 | ||
| 49 | - >>> repo.commits('master', 10, 20) | ||
| 49 | + >>> repo.commits('master', max_count=10, skip=20) | ||
| 50 | 50 | ||
| 51 | 51 | The above will return commits 21-30 from the commit list. | |
| 52 | - | ||
| 52 | + | ||
| 53 | 53 | The Commit object | |
| 54 | 54 | ***************** | |
| 55 | 55 | ||
@@ -79,7 +79,7 @@ Commit objects contain information about a specific commit. | |||
| 79 | 79 | (2008, 5, 7, 5, 0, 56, 2, 128, 0) | |
| 80 | 80 | ||
| 81 | 81 | >>> head.message | |
| 82 | - 'cleaned up a lot of test information. Fixed escaping so it works with | ||
| 82 | + 'cleaned up a lot of test information. Fixed escaping so it works with | ||
| 83 | 83 | subprocess.' | |
| 84 | 84 | ||
| 85 | 85 | Note: date time is represented in a `struct_time`_ format. Conversion to | |
@@ -183,10 +183,10 @@ You can also get a blob directly from the repo if you know its name. | |||
| 183 | 183 | What Else? | |
| 184 | 184 | ********** | |
| 185 | 185 | ||
| 186 | - There is more stuff in there, like the ability to tar or gzip repos, stats, | ||
| 187 | - log, blame, and probably a few other things. Additionally calls to the git | ||
| 188 | - instance are handled through a ``__getattr__`` construct, which makes | ||
| 189 | - available any git commands directly, with a nice conversion of Python dicts | ||
| 186 | + There is more stuff in there, like the ability to tar or gzip repos, stats, | ||
| 187 | + log, blame, and probably a few other things. Additionally calls to the git | ||
| 188 | + instance are handled through a ``__getattr__`` construct, which makes | ||
| 189 | + available any git commands directly, with a nice conversion of Python dicts | ||
| 190 | 190 | to command line parameters. | |
| 191 | 191 | ||
| 192 | 192 | Check the unit tests, they're pretty exhaustive. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments