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 5427b3d
Browse filesBrowse the repository at this point in the historyBrowse files
The README opened on the drivers, then installing gitlib, before any
code. It now starts with badges, a line on what gitlib is, and an
example reading a log, a diff and a blame, which runs as it is. Then
what gitlib does, with links to the documentation, its site, the two
drivers, how to install it, and the license.
`Repository` runs git through a driver, its last argument:
53
50
54
-
The last argument of `Repository` is the driver running git. It is `CliDriver`, which runs the
55
-
`git` binary, by default. To run libgit2 instead, pass a `LibGit2Driver`: everything above works
56
-
the same, except `run()`, which needs the `git` binary.
51
+
-`CliDriver`, the default, runs the `git` binary, 1.8.4 or later, and needs nothing else;
52
+
-`LibGit2Driver`, experimental, runs [libgit2](https://libgit2.org/) 1.9 in-process, through
53
+
PHP's `FFI` extension. It is faster for many small reads in a long-running process, and
54
+
slower on long histories, like blames: see
55
+
["Choosing a driver"](doc/repository.md#choosing-a-driver).
57
56
58
57
```php
59
58
use Gitonomy\Git\Driver\Ffi\LibGit2Driver;
@@ -62,26 +61,40 @@ use Gitonomy\Git\Repository;
62
61
$repository = new Repository('/path/to/repository', driver: new LibGit2Driver());
63
62
```
64
63
65
-
API Documentation
66
-
-----------------
67
-
68
-
+[Blame](doc/blame.md)
69
-
+[Blob](doc/blob.md)
70
-
+[Branch](doc/branch.md)
71
-
+[Commit](doc/commit.md)
72
-
+[Creating repositories](doc/admin.md)
73
-
+[Diff](doc/diff.md)
74
-
+[Hooks](doc/hooks.md)
75
-
+[Log](doc/log.md)
76
-
+[References](doc/references.md)
77
-
+[Repository](doc/repository.md): opening a repository, drivers, errors
78
-
+[Revision](doc/revision.md)
79
-
+[Tree](doc/tree.md)
80
-
+[Working Copy](doc/workingcopy.md)
64
+
Installation
65
+
------------
66
+
67
+
```bash
68
+
composer require gitonomy/gitlib
69
+
```
70
+
71
+
Upgrading from 1.x? Read [UPGRADE-2.0.md](UPGRADE-2.0.md) and the [changelog](CHANGELOG.md).
72
+
73
+
Documentation
74
+
-------------
75
+
76
+
-[Opening a repository](doc/repository.md): paths, drivers, errors, git configuration
77
+
-[Creating repositories](doc/admin.md)
78
+
-[Revisions](doc/revision.md)
79
+
-[Commits](doc/commit.md)
80
+
-[Log](doc/log.md)
81
+
-[Trees](doc/tree.md)
82
+
-[Blobs](doc/blob.md)
83
+
-[Diffs](doc/diff.md)
84
+
-[Blame](doc/blame.md)
85
+
-[Tags and branches](doc/references.md)
86
+
-[Branches](doc/branch.md)
87
+
-[Working copy](doc/workingcopy.md)
88
+
-[Hooks](doc/hooks.md)
81
89
82
90
For Enterprise
83
91
--------------
84
92
85
93
Available as part of the Tidelift Subscription
86
94
87
95
The maintainers of `gitonomy/gitlib` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-gitonomy-gitlib?utm_source=packagist-gitonomy-gitlib&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
96
+
97
+
License
98
+
-------
99
+
100
+
gitlib is released under the [MIT license](https://github.com/gitonomy/gitlib/blob/main/LICENSE).
0 commit comments