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 d2bc5ea
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 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
46
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.
47
+
-`CliDriver`, the default, runs the `git` binary, 1.8.4 or later, and needs nothing else;
48
+
-`LibGit2Driver`, experimental, runs [libgit2](https://libgit2.org/) 1.9 in-process, through
49
+
PHP's `FFI` extension. It is faster for many small reads in a long-running process, and
50
+
slower on long histories, like blames: see
51
+
["Choosing a driver"](doc/repository.md#choosing-a-driver).
57
52
58
53
```php
59
54
use Gitonomy\Git\Driver\Ffi\LibGit2Driver;
@@ -62,26 +57,40 @@ use Gitonomy\Git\Repository;
62
57
$repository = new Repository('/path/to/repository', driver: new LibGit2Driver());
63
58
```
64
59
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)
60
+
Installation
61
+
------------
62
+
63
+
```bash
64
+
composer require gitonomy/gitlib
65
+
```
66
+
67
+
Upgrading from 1.x? Read [UPGRADE-2.0.md](UPGRADE-2.0.md) and the [changelog](CHANGELOG.md).
68
+
69
+
Documentation
70
+
-------------
71
+
72
+
-[Opening a repository](doc/repository.md): paths, drivers, errors, git configuration
73
+
-[Creating repositories](doc/admin.md)
74
+
-[Revisions](doc/revision.md)
75
+
-[Commits](doc/commit.md)
76
+
-[Log](doc/log.md)
77
+
-[Trees](doc/tree.md)
78
+
-[Blobs](doc/blob.md)
79
+
-[Diffs](doc/diff.md)
80
+
-[Blame](doc/blame.md)
81
+
-[Tags and branches](doc/references.md)
82
+
-[Branches](doc/branch.md)
83
+
-[Working copy](doc/workingcopy.md)
84
+
-[Hooks](doc/hooks.md)
81
85
82
86
For Enterprise
83
87
--------------
84
88
85
89
Available as part of the Tidelift Subscription
86
90
87
91
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)
92
+
93
+
License
94
+
-------
95
+
96
+
gitlib is released under the [MIT license](https://github.com/gitonomy/gitlib/blob/main/LICENSE).
0 commit comments