Skip to content

Commit dca0c4c

Browse files
committed
*: Improve docs on examples, compatibility and extensibility
Fixes go-git#777 Signed-off-by: Paulo Gomes <[email protected]>
1 parent dd4e2b7 commit dca0c4c

File tree

3 files changed

+315
-111
lines changed

3 files changed

+315
-111
lines changed

COMPATIBILITY.md

+233-111
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,233 @@
1-
Supported Capabilities
2-
======================
3-
4-
Here is a non-comprehensive table of git commands and features whose equivalent
5-
is supported by go-git.
6-
7-
| Feature | Status | Notes |
8-
|---------------------------------------|--------|-------|
9-
| **config** |
10-
| config || Reading and modifying per-repository configuration (`.git/config`) is supported. Global configuration (`$HOME/.gitconfig`) is not. |
11-
| **getting and creating repositories** |
12-
| init || Plain init and `--bare` are supported. Flags `--template`, `--separate-git-dir` and `--shared` are not. |
13-
| clone || Plain clone and equivalents to `--progress`, `--single-branch`, `--depth`, `--origin`, `--recurse-submodules` are supported. Others are not. |
14-
| **basic snapshotting** |
15-
| add || Plain add is supported. Any other flags aren't supported |
16-
| status ||
17-
| commit ||
18-
| reset ||
19-
| rm ||
20-
| mv ||
21-
| **branching and merging** |
22-
| branch ||
23-
| checkout || Basic usages of checkout are supported. |
24-
| merge ||
25-
| mergetool ||
26-
| stash ||
27-
| tag ||
28-
| **sharing and updating projects** |
29-
| fetch ||
30-
| pull || Only supports merges where the merge can be resolved as a fast-forward. |
31-
| push ||
32-
| remote ||
33-
| submodule ||
34-
| **inspection and comparison** |
35-
| show ||
36-
| log ||
37-
| shortlog | (see log) |
38-
| describe | |
39-
| **patching** |
40-
| apply ||
41-
| cherry-pick ||
42-
| diff || Patch object with UnifiedDiff output representation |
43-
| rebase ||
44-
| revert ||
45-
| **debugging** |
46-
| bisect ||
47-
| blame ||
48-
| grep ||
49-
| **email** ||
50-
| am ||
51-
| apply ||
52-
| format-patch ||
53-
| send-email ||
54-
| request-pull ||
55-
| **external systems** |
56-
| svn ||
57-
| fast-import ||
58-
| **administration** |
59-
| clean ||
60-
| gc ||
61-
| fsck ||
62-
| reflog ||
63-
| filter-branch ||
64-
| instaweb ||
65-
| archive ||
66-
| bundle ||
67-
| prune ||
68-
| repack ||
69-
| **server admin** |
70-
| daemon | |
71-
| update-server-info | |
72-
| **advanced** |
73-
| notes ||
74-
| replace ||
75-
| worktree ||
76-
| annotate | (see blame) |
77-
| **gpg** |
78-
| git-verify-commit ||
79-
| git-verify-tag ||
80-
| **plumbing commands** |
81-
| cat-file ||
82-
| check-ignore | |
83-
| commit-tree | |
84-
| count-objects | |
85-
| diff-index | |
86-
| for-each-ref ||
87-
| hash-object ||
88-
| ls-files ||
89-
| merge-base || Calculates the merge-base only between two commits, and supports `--independent` and `--is-ancestor` modifiers; Does not support `--fork-point` nor `--octopus` modifiers. |
90-
| read-tree | |
91-
| rev-list ||
92-
| rev-parse | |
93-
| show-ref ||
94-
| symbolic-ref ||
95-
| update-index | |
96-
| update-ref | |
97-
| verify-pack | |
98-
| write-tree | |
99-
| **protocols** |
100-
| http(s):// (dumb) ||
101-
| http(s):// (smart) ||
102-
| git:// ||
103-
| ssh:// ||
104-
| file:// | partial | Warning: this is not pure Golang. This shells out to the `git` binary. |
105-
| custom ||
106-
| **other features** |
107-
| gitignore ||
108-
| gitattributes ||
109-
| index version | |
110-
| packfile version | |
111-
| push-certs ||
1+
# Supported Features
2+
3+
Here is a non-comprehensive table of git commands and features and their
4+
compatibility status with go-git.
5+
6+
## Getting and creating repositories
7+
8+
| Feature | Sub-feature | Status | Notes | Examples |
9+
|---|---|---|---|---|
10+
| `init` | || | |
11+
| `init` | `--bare` || | |
12+
| `init` | `--template` <br/> `--separate-git-dir` <br/> `--shared` || | |
13+
| `clone` | || | - [PlainClone](_examples/clone/main.go) |
14+
| `clone` | Authentication: <br/> - none <br/> - access token <br/> - username + password <br/> - ssh || | - [clone ssh](_examples/clone/auth/ssh/main.go) <br/> - [clone access token](_examples/clone/auth/basic/access_token/main.go) <br/> - [clone user + password](_examples/clone/auth/basic/username_password/main.go) |
15+
| `clone` | `--progress` <br/> `--single-branch` <br/> `--depth` <br/> `--origin` <br/> `--recurse-submodules` || | - [recurse submodules](_examples/clone/main.go) <br/> - [progress](_examples/progress/main.go) |
16+
17+
## Basic snapshotting
18+
19+
| Feature | Sub-feature | Status | Notes | Examples |
20+
|---|---|---|---|---|
21+
| `add` | || Plain add is supported. Any other flags aren't supported | |
22+
| `status` | || | |
23+
| `commit` | || | - [commit](_examples/commit/main.go) |
24+
| `reset` | || | |
25+
| `rm` | || | |
26+
| `mv` | || | |
27+
28+
## Branching and merging
29+
30+
| Feature | Sub-feature | Status | Notes | Examples |
31+
|---|---|---|---|---|
32+
| `branch` | || | - [branch](_examples/branch/main.go) |
33+
| `checkout` | || Basic usages of checkout are supported. | - [checkout](_examples/checkout/main.go) |
34+
| `merge` | || | |
35+
| `mergetool` | || | |
36+
| `stash` | || | |
37+
| `tag` | || | - [tag](_examples/tag/main.go) <br/> - [tag create and push](_examples/tag-create-push/main.go) |
38+
39+
## Sharing and updating projects
40+
41+
| Feature | Sub-feature | Status | Notes | Examples |
42+
|---|---|---|---|---|
43+
| `fetch` | || | |
44+
| `pull` | || Only supports merges where the merge can be resolved as a fast-forward. | - [pull](_examples/pull/main.go) |
45+
| `push` | || | - [push](_examples/push/main.go) |
46+
| `remote` | || | - [remotes](_examples/remotes/main.go) |
47+
| `submodule` | || | - [submodule](_examples/submodule/main.go) |
48+
| `submodule` | deinit || | |
49+
50+
## Inspection and comparison
51+
52+
| Feature | Sub-feature | Status | Notes | Examples |
53+
|---|---|---|---|---|
54+
| `show` | || | |
55+
| `log` | || | - [log](_examples/log/main.go) |
56+
| `shortlog` | | (see log) | | |
57+
| `describe` | || | |
58+
59+
## Patching
60+
61+
| Feature | Sub-feature | Status | Notes | Examples |
62+
|---|---|---|---|---|
63+
| `apply` | || | |
64+
| `cherry-pick` | || | |
65+
| `diff` | || Patch object with UnifiedDiff output representation. | |
66+
| `rebase` | || | |
67+
| `revert` | || | |
68+
69+
## Debugging
70+
71+
| Feature | Sub-feature | Status | Notes | Examples |
72+
|---|---|---|---|---|
73+
| `bisect` | || | |
74+
| `blame` | || | - [blame](_examples/blame/main.go) |
75+
| `grep` | || | |
76+
77+
## Email
78+
79+
| Feature | Sub-feature | Status | Notes | Examples |
80+
|---|---|---|---|---|
81+
| `am` | || | |
82+
| `apply` | || | |
83+
| `format-patch` | || | |
84+
| `send-email` | || | |
85+
| `request-pull` | || | |
86+
87+
## External systems
88+
89+
| Feature | Sub-feature | Status | Notes | Examples |
90+
|---|---|---|---|---|
91+
| `svn` | || | |
92+
| `fast-import` | || | |
93+
| `lfs` | || | |
94+
95+
## Administration
96+
97+
| Feature | Sub-feature | Status | Notes | Examples |
98+
|---|---|---|---|---|
99+
| `clean` | || | |
100+
| `gc` | || | |
101+
| `fsck` | || | |
102+
| `reflog` | || | |
103+
| `filter-branch` | || | |
104+
| `instaweb` | || | |
105+
| `archive` | || | |
106+
| `bundle` | || | |
107+
| `prune` | || | |
108+
| `repack` | || | |
109+
110+
## Server admin
111+
112+
| Feature | Sub-feature | Status | Notes | Examples |
113+
|---|---|---|---|---|
114+
| `daemon` | || | |
115+
| `update-server-info` | || | |
116+
117+
## Advanced
118+
119+
| Feature | Sub-feature | Status | Notes | Examples |
120+
|---|---|---|---|---|
121+
| `notes` | || | |
122+
| `replace` | || | |
123+
| `worktree` | || | |
124+
| `annotate` | | (see blame) | | |
125+
126+
## GPG
127+
128+
| Feature | Sub-feature | Status | Notes | Examples |
129+
|---|---|---|---|---|
130+
| `git-verify-commit` | || | |
131+
| `git-verify-tag` | || | |
132+
133+
## Plumbing commands
134+
135+
| Feature | Sub-feature | Status | Notes | Examples |
136+
|---|---|---|---|---|
137+
| `cat-file` | || | |
138+
| `check-ignore` | || | |
139+
| `commit-tree` | || | |
140+
| `count-objects` | || | |
141+
| `diff-index` | || | |
142+
| `for-each-ref` | || | |
143+
| `hash-object` | || | |
144+
| `ls-files` | || | |
145+
| `ls-remote` | || | - [ls-remote](_examples/ls-remote/main.go) |
146+
| `merge-base` | `--independent` <br/> `--is-ancestor` | ⚠️ (partial) | Calculates the merge-base only between two commits. | - [merge-base](_examples/merge_base/main.go) |
147+
| `merge-base` | `--fork-point` <br/> `--octopus` || | |
148+
| `read-tree` | || | |
149+
| `rev-list` | || | |
150+
| `rev-parse` | || | |
151+
| `show-ref` | || | |
152+
| `symbolic-ref` | || | |
153+
| `update-index` | || | |
154+
| `update-ref` | || | |
155+
| `verify-pack` | || | |
156+
| `write-tree` | || | |
157+
158+
## Indexes and Git Protocols
159+
160+
| Feature | Version | Status | Notes |
161+
|---|---|---|---|
162+
| index | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-index.txt) || |
163+
| index | [v2](https://github.com/git/git/blob/master/Documentation/gitformat-index.txt) || |
164+
| index | [v3](https://github.com/git/git/blob/master/Documentation/gitformat-index.txt) || |
165+
| pack-protocol | [v1](https://github.com/git/git/blob/master/Documentation/gitprotocol-pack.txt) || |
166+
| pack-protocol | [v2](https://github.com/git/git/blob/master/Documentation/gitprotocol-v2.txt) || |
167+
| multi-pack-index | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-pack.txt) || |
168+
| pack-*.rev files | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-pack.txt) || |
169+
| pack-*.mtimes files | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-pack.txt) || |
170+
| cruft packs | || |
171+
172+
## Capabilities
173+
174+
| Feature | Status | Notes |
175+
|---|---|---|
176+
| `multi_ack` || |
177+
| `multi_ack_detailed` || |
178+
| `no-done` || |
179+
| `thin-pack` || |
180+
| `side-band` | ⚠️ (partial) | |
181+
| `side-band-64k` | ⚠️ (partial) | |
182+
| `ofs-delta` || |
183+
| `agent` || |
184+
| `object-format` || |
185+
| `symref` || |
186+
| `shallow` || |
187+
| `deepen-since` || |
188+
| `deepen-not` || |
189+
| `deepen-relative` || |
190+
| `no-progress` || |
191+
| `include-tag` || |
192+
| `report-status` || |
193+
| `report-status-v2` || |
194+
| `delete-refs` || |
195+
| `quiet` || |
196+
| `atomic` || |
197+
| `push-options` || |
198+
| `allow-tip-sha1-in-want` || |
199+
| `allow-reachable-sha1-in-want` || |
200+
| `push-cert=<nonce>` || |
201+
| `filter` || |
202+
| `session-id=<session id>` || |
203+
204+
## Transport Schemes
205+
206+
| Scheme | Status | Notes | Examples |
207+
|---|---|---|---|
208+
| `http(s)://` (dumb) || | |
209+
| `http(s)://` (smart) || | |
210+
| `git://` || | |
211+
| `ssh://` || | |
212+
| `file://` | ⚠️ (partial) | Warning: this is not pure Golang. This shells out to the `git` binary. | |
213+
| Custom || All existing schemes can be replaced by custom implementations. | - [custom_http](_examples/custom_http/main.go) |
214+
215+
## SHA256
216+
217+
| Feature | Sub-feature | Status | Notes | Examples |
218+
|---|---|---|---|---|
219+
| `init` | || Requires building with tag sha256. | - [init](_examples/sha256/main.go) |
220+
| `commit` | || Requires building with tag sha256. | - [commit](_examples/sha256/main.go) |
221+
| `pull` | || | |
222+
| `fetch` | || | |
223+
| `push` | || | |
224+
225+
## Other features
226+
227+
| Feature | Sub-feature | Status | Notes | Examples |
228+
|---|---|---|---|---|
229+
| `config` | `--local` || Read and write per-repository (`.git/config`). | |
230+
| `config` | `--global` <br/> `--system` || Read-only. | |
231+
| `gitignore` | || | |
232+
| `gitattributes` | || | |
233+
| `git-worktree` | || Multiple worktrees are not supported. | |

0 commit comments

Comments
 (0)