just-git 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -43
- package/dist/index.js +377 -367
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,13 +40,13 @@ await bash.exec("git log --oneline");
|
|
|
40
40
|
|
|
41
41
|
`createGit(options?)` accepts:
|
|
42
42
|
|
|
43
|
-
| Option | Description
|
|
44
|
-
| --------------- |
|
|
45
|
-
| `identity` | Author/committer override. With `locked: true`, always wins over env vars and git config. Without `locked`, acts as a fallback.
|
|
46
|
-
| `credentials` | `(url) => HttpAuth \| null` callback for Smart HTTP transport auth.
|
|
47
|
-
| `disabled` | `GitCommandName[]` of subcommands to block (e.g. `["push", "rebase"]`).
|
|
43
|
+
| Option | Description |
|
|
44
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| `identity` | Author/committer override. With `locked: true`, always wins over env vars and git config. Without `locked`, acts as a fallback. |
|
|
46
|
+
| `credentials` | `(url) => HttpAuth \| null` callback for Smart HTTP transport auth. |
|
|
47
|
+
| `disabled` | `GitCommandName[]` of subcommands to block (e.g. `["push", "rebase"]`). |
|
|
48
48
|
| `network` | `{ allowed?: string[], fetch?: FetchFunction }` to restrict HTTP access and/or provide a custom `fetch`. `allowed` accepts hostnames (`"github.com"`) or URL prefixes (`"https://github.com/myorg/"`). Set to `false` to block all network access. |
|
|
49
|
-
| `resolveRemote` | `(url) => GitContext \| null` callback for cross-VFS remote resolution. See [Multi-agent collaboration](#multi-agent-collaboration).
|
|
49
|
+
| `resolveRemote` | `(url) => GitContext \| null` callback for cross-VFS remote resolution. See [Multi-agent collaboration](#multi-agent-collaboration). |
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
52
|
const git = createGit({
|
|
@@ -185,42 +185,42 @@ See [`examples/multi-agent.ts`](examples/multi-agent.ts) for a full working exam
|
|
|
185
185
|
|
|
186
186
|
See [CLI.md](CLI.md) for full usage details.
|
|
187
187
|
|
|
188
|
-
| Command | Flags / options
|
|
189
|
-
| --------------------------------- |
|
|
190
|
-
| `init [<dir>]` | `--bare`, `--initial-branch`
|
|
191
|
-
| `clone <repo> [<dir>]` | `--bare`, `-b <branch>`
|
|
192
|
-
| `blame <file>` | `-L <start>,<end>`, `-l`/`--long`, `-e`/`--show-email`, `-s`/`--suppress`, `-p`/`--porcelain`, `--line-porcelain`
|
|
193
|
-
| `add <paths>` | `.`, `--all`/`-A`, `--update`/`-u`, `--force`/`-f`, `-n`/`--dry-run`, glob pathspecs
|
|
194
|
-
| `rm <paths>` | `--cached`, `-r`, `-f`, `-n`/`--dry-run`, glob pathspecs
|
|
195
|
-
| `mv <src> <dst>` | `-f`, `-n`/`--dry-run`, `-k`
|
|
196
|
-
| `commit` | `-m`, `-F <file>` / `-F -`, `--allow-empty`, `--amend`, `--no-edit`, `-a`
|
|
197
|
-
| `status` | `-s`/`--short`, `--porcelain`, `-b`/`--branch`
|
|
198
|
-
| `log` | `--oneline`, `-n`, `--all`, `--reverse`, `--decorate`, `--format`/`--pretty`, `A..B`, `A...B`, `-- <path>`, `--author=`, `--grep=`, `--since`/`--after`, `--until`/`--before`
|
|
199
|
-
| `show [<object>]` | Commits (with diff), annotated tags, trees, blobs
|
|
200
|
-
| `diff` | `--cached`/`--staged`, `<commit>`, `<commit> <commit>`, `A..B`, `A...B`, `-- <path>`, `--stat`, `--shortstat`, `--numstat`, `--name-only`, `--name-status`
|
|
201
|
-
| `branch` | `-d`, `-D`, `-m`, `-M`, `-r`, `-a`/`--all`, `-v`/`-vv`, `-u`/`--set-upstream-to`
|
|
202
|
-
| `tag [<name>] [<commit>]` | `-a -m` (annotated), `-d`, `-l <pattern>`, `-f`
|
|
203
|
-
| `switch` | `-c`/`-C` (create/force-create), `--detach`/`-d`, `--orphan`, `-` (previous branch), `--guess`/`--no-guess`
|
|
204
|
-
| `restore` | `-s`/`--source`, `-S`/`--staged`, `-W`/`--worktree`, `-S -W` (both), `--ours`/`--theirs`, pathspec globs
|
|
205
|
-
| `checkout` | `-b`, `-B`, `--orphan`, detached HEAD, `-- <paths>`, `--ours`/`--theirs`, pathspec globs
|
|
206
|
-
| `reset [<commit>]` | `-- <paths>`, `--soft`, `--mixed`, `--hard`, pathspec globs
|
|
207
|
-
| `merge <branch>` | `--no-ff`, `--ff-only`, `--squash`, `-m`, `--abort`, `--continue`, conflict markers
|
|
208
|
-
| `revert <commit>` | `--abort`, `--continue`, `-n`/`--no-commit`, `--no-edit`, `-m`/`--mainline`
|
|
209
|
-
| `cherry-pick <commit>` | `--abort`, `--continue`, `--skip`, `-x`, `-m`/`--mainline`, `-n`/`--no-commit`, preserves original author
|
|
210
|
-
| `rebase <upstream>` | `--onto <newbase>`, `--abort`, `--continue`, `--skip`
|
|
211
|
-
| `stash` | `push`, `pop`, `apply`, `list`, `drop`, `show`, `clear`, `-m`, `-u`/`--include-untracked`, `stash@{N}`
|
|
212
|
-
| `remote` | `add`, `remove`/`rm`, `rename`, `set-url`, `get-url`, `-v`
|
|
213
|
-
| `config` | `get`, `set`, `unset`, `list`, `--list`/`-l`, `--unset`
|
|
214
|
-
| `fetch [<remote>] [<refspec>...]` | `--all`, `--tags`, `--prune`/`-p`
|
|
215
|
-
| `push [<remote>] [<refspec>...]` | `--force`/`-f`, `-u`/`--set-upstream`, `--all`, `--tags`, `--delete`/`-d`
|
|
216
|
-
| `pull [<remote>] [<branch>]` | `--ff-only`, `--no-ff`, `--rebase`/`-r`, `--no-rebase`
|
|
217
|
-
| `bisect` | `start`, `bad`/`good`/`new`/`old`, `skip`, `reset`, `log`, `replay`, `run`, `terms`, `visualize`/`view`, `--term-new`/`--term-old`, `--no-checkout`, `--first-parent`
|
|
218
|
-
| `clean` | `-f`, `-n`/`--dry-run`, `-d`, `-x`, `-X`, `-e`/`--exclude`
|
|
219
|
-
| `reflog` | `show [<ref>]`, `exists`, `-n`/`--max-count`
|
|
220
|
-
| `gc` | `--aggressive`
|
|
221
|
-
| `repack` | `-a`/`--all`, `-d`/`--delete`
|
|
222
|
-
| `rev-parse` | `--verify`, `--short`, `--abbrev-ref`, `--symbolic-full-name`, `--show-toplevel`, `--git-dir`, `--is-inside-work-tree`, `--is-bare-repository`, `--show-prefix`, `--show-cdup`
|
|
223
|
-
| `ls-files` | `-c`/`--cached`, `-m`/`--modified`, `-d`/`--deleted`, `-o`/`--others`, `-u`/`--unmerged`, `-s`/`--stage`, `--exclude-standard`, `-z`, `-t`
|
|
188
|
+
| Command | Flags / options |
|
|
189
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
190
|
+
| `init [<dir>]` | `--bare`, `--initial-branch` |
|
|
191
|
+
| `clone <repo> [<dir>]` | `--bare`, `-b <branch>` |
|
|
192
|
+
| `blame <file>` | `-L <start>,<end>`, `-l`/`--long`, `-e`/`--show-email`, `-s`/`--suppress`, `-p`/`--porcelain`, `--line-porcelain` |
|
|
193
|
+
| `add <paths>` | `.`, `--all`/`-A`, `--update`/`-u`, `--force`/`-f`, `-n`/`--dry-run`, glob pathspecs |
|
|
194
|
+
| `rm <paths>` | `--cached`, `-r`, `-f`, `-n`/`--dry-run`, glob pathspecs |
|
|
195
|
+
| `mv <src> <dst>` | `-f`, `-n`/`--dry-run`, `-k` |
|
|
196
|
+
| `commit` | `-m`, `-F <file>` / `-F -`, `--allow-empty`, `--amend`, `--no-edit`, `-a` |
|
|
197
|
+
| `status` | `-s`/`--short`, `--porcelain`, `-b`/`--branch` |
|
|
198
|
+
| `log` | `--oneline`, `-n`, `--all`, `--reverse`, `--decorate`, `--format`/`--pretty`, `-p`/`--patch`, `--stat`, `--name-status`, `--name-only`, `--shortstat`, `--numstat`, `A..B`, `A...B`, `-- <path>`, `--author=`, `--grep=`, `--since`/`--after`, `--until`/`--before` |
|
|
199
|
+
| `show [<object>]` | Commits (with diff), annotated tags, trees, blobs |
|
|
200
|
+
| `diff` | `--cached`/`--staged`, `<commit>`, `<commit> <commit>`, `A..B`, `A...B`, `-- <path>`, `--stat`, `--shortstat`, `--numstat`, `--name-only`, `--name-status` |
|
|
201
|
+
| `branch` | `-d`, `-D`, `-m`, `-M`, `-r`, `-a`/`--all`, `-v`/`-vv`, `-u`/`--set-upstream-to` |
|
|
202
|
+
| `tag [<name>] [<commit>]` | `-a -m` (annotated), `-d`, `-l <pattern>`, `-f` |
|
|
203
|
+
| `switch` | `-c`/`-C` (create/force-create), `--detach`/`-d`, `--orphan`, `-` (previous branch), `--guess`/`--no-guess` |
|
|
204
|
+
| `restore` | `-s`/`--source`, `-S`/`--staged`, `-W`/`--worktree`, `-S -W` (both), `--ours`/`--theirs`, pathspec globs |
|
|
205
|
+
| `checkout` | `-b`, `-B`, `--orphan`, detached HEAD, `-- <paths>`, `--ours`/`--theirs`, pathspec globs |
|
|
206
|
+
| `reset [<commit>]` | `-- <paths>`, `--soft`, `--mixed`, `--hard`, pathspec globs |
|
|
207
|
+
| `merge <branch>` | `--no-ff`, `--ff-only`, `--squash`, `-m`, `--abort`, `--continue`, conflict markers |
|
|
208
|
+
| `revert <commit>` | `--abort`, `--continue`, `-n`/`--no-commit`, `--no-edit`, `-m`/`--mainline` |
|
|
209
|
+
| `cherry-pick <commit>` | `--abort`, `--continue`, `--skip`, `-x`, `-m`/`--mainline`, `-n`/`--no-commit`, preserves original author |
|
|
210
|
+
| `rebase <upstream>` | `--onto <newbase>`, `--abort`, `--continue`, `--skip` |
|
|
211
|
+
| `stash` | `push`, `pop`, `apply`, `list`, `drop`, `show`, `clear`, `-m`, `-u`/`--include-untracked`, `stash@{N}` |
|
|
212
|
+
| `remote` | `add`, `remove`/`rm`, `rename`, `set-url`, `get-url`, `-v` |
|
|
213
|
+
| `config` | `get`, `set`, `unset`, `list`, `--list`/`-l`, `--unset` |
|
|
214
|
+
| `fetch [<remote>] [<refspec>...]` | `--all`, `--tags`, `--prune`/`-p` |
|
|
215
|
+
| `push [<remote>] [<refspec>...]` | `--force`/`-f`, `-u`/`--set-upstream`, `--all`, `--tags`, `--delete`/`-d` |
|
|
216
|
+
| `pull [<remote>] [<branch>]` | `--ff-only`, `--no-ff`, `--rebase`/`-r`, `--no-rebase` |
|
|
217
|
+
| `bisect` | `start`, `bad`/`good`/`new`/`old`, `skip`, `reset`, `log`, `replay`, `run`, `terms`, `visualize`/`view`, `--term-new`/`--term-old`, `--no-checkout`, `--first-parent` |
|
|
218
|
+
| `clean` | `-f`, `-n`/`--dry-run`, `-d`, `-x`, `-X`, `-e`/`--exclude` |
|
|
219
|
+
| `reflog` | `show [<ref>]`, `exists`, `-n`/`--max-count` |
|
|
220
|
+
| `gc` | `--aggressive` |
|
|
221
|
+
| `repack` | `-a`/`--all`, `-d`/`--delete` |
|
|
222
|
+
| `rev-parse` | `--verify`, `--short`, `--abbrev-ref`, `--symbolic-full-name`, `--show-toplevel`, `--git-dir`, `--is-inside-work-tree`, `--is-bare-repository`, `--show-prefix`, `--show-cdup` |
|
|
223
|
+
| `ls-files` | `-c`/`--cached`, `-m`/`--modified`, `-d`/`--deleted`, `-o`/`--others`, `-u`/`--unmerged`, `-s`/`--stage`, `--exclude-standard`, `-z`, `-t` |
|
|
224
224
|
|
|
225
225
|
### Transport
|
|
226
226
|
|
|
@@ -264,4 +264,3 @@ console.log(result.exitCode); // 0
|
|
|
264
264
|
```
|
|
265
265
|
|
|
266
266
|
The `FileSystem` interface requires: `readFile`, `readFileBuffer`, `writeFile`, `exists`, `stat`, `mkdir`, `readdir`, `rm`. Optional: `lstat`, `readlink`, `symlink`.
|
|
267
|
-
|