@statewalker/vcs-commands 0.13.0 → 0.15.0
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/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-backend.d.ts +1 -1
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
- package/dist/commands/archive/archive-command.d.ts +6 -2
- package/dist/commands/archive/archive-command.d.ts.map +1 -1
- package/dist/commands/archive/remote-archive-command.d.ts +27 -2
- package/dist/commands/archive/remote-archive-command.d.ts.map +1 -1
- package/dist/commands/archive/upload-archive-writer.d.ts +11 -5
- package/dist/commands/archive/upload-archive-writer.d.ts.map +1 -1
- package/dist/commands/branch-command.d.ts +14 -2
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/bundle/bundle-format.d.ts +6 -1
- package/dist/commands/bundle/bundle-format.d.ts.map +1 -1
- package/dist/commands/bundle/bundle-uri-host.d.ts +12 -1
- package/dist/commands/bundle/bundle-uri-host.d.ts.map +1 -1
- package/dist/commands/bundle/bundle-uri.d.ts +7 -1
- package/dist/commands/bundle/bundle-uri.d.ts.map +1 -1
- package/dist/commands/bundle/bundle-verify.d.ts +4 -1
- package/dist/commands/bundle/bundle-verify.d.ts.map +1 -1
- package/dist/commands/cat-file/batch-format.d.ts +8 -12
- package/dist/commands/cat-file/batch-format.d.ts.map +1 -1
- package/dist/commands/cat-file/cat-file-command.d.ts +39 -5
- package/dist/commands/cat-file/cat-file-command.d.ts.map +1 -1
- package/dist/commands/check-ignore-command.d.ts.map +1 -1
- package/dist/commands/checkout-command.d.ts +4 -0
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-paths.d.ts +9 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -1
- package/dist/commands/cherry-pick-command.d.ts +3 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-interactive.d.ts +0 -9
- package/dist/commands/clean-interactive.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +17 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/column/column-config.d.ts +23 -0
- package/dist/commands/column/column-config.d.ts.map +1 -0
- package/dist/commands/column/column-layout.d.ts +129 -0
- package/dist/commands/column/column-layout.d.ts.map +1 -0
- package/dist/commands/column/index.d.ts +3 -0
- package/dist/commands/column/index.d.ts.map +1 -0
- package/dist/commands/column-command.d.ts +59 -0
- package/dist/commands/column-command.d.ts.map +1 -0
- package/dist/commands/comment-char-config.d.ts +15 -0
- package/dist/commands/comment-char-config.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +30 -2
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/config-command.d.ts +12 -0
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/credential-helper.d.ts +214 -0
- package/dist/commands/credential-helper.d.ts.map +1 -0
- package/dist/commands/default-branch.d.ts +33 -3
- package/dist/commands/default-branch.d.ts.map +1 -1
- package/dist/commands/diff-color-config.d.ts +4 -0
- package/dist/commands/diff-color-config.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +12 -0
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fast-export/fast-export-command.d.ts +89 -2
- package/dist/commands/fast-export/fast-export-command.d.ts.map +1 -1
- package/dist/commands/fast-export/fast-import-command.d.ts +113 -8
- package/dist/commands/fast-export/fast-import-command.d.ts.map +1 -1
- package/dist/commands/fast-export/fast-stream-support.d.ts +0 -9
- package/dist/commands/fast-export/fast-stream-support.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +23 -1
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +31 -3
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/history-command.d.ts +173 -7
- package/dist/commands/history-command.d.ts.map +1 -1
- package/dist/commands/index-host.d.ts +19 -0
- package/dist/commands/index-host.d.ts.map +1 -1
- package/dist/commands/index-refresh.d.ts +36 -0
- package/dist/commands/index-refresh.d.ts.map +1 -0
- package/dist/commands/index.d.ts +9 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +7 -6
- package/dist/commands/init-command.d.ts +20 -0
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/local-transport.d.ts +40 -2
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +7 -0
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +11 -0
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-tree-command.d.ts +10 -0
- package/dist/commands/ls-tree-command.d.ts.map +1 -1
- package/dist/commands/maintenance-schedule-command.d.ts +122 -0
- package/dist/commands/maintenance-schedule-command.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +13 -1
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-index-command.d.ts +42 -0
- package/dist/commands/merge-index-command.d.ts.map +1 -0
- package/dist/commands/merge-one-file.d.ts +129 -0
- package/dist/commands/merge-one-file.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +40 -4
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/object-disk-info.d.ts +35 -0
- package/dist/commands/object-disk-info.d.ts.map +1 -0
- package/dist/commands/octopus-merge.d.ts +3 -3
- package/dist/commands/octopus-merge.d.ts.map +1 -1
- package/dist/commands/plumbing-input.d.ts.map +1 -1
- package/dist/commands/promisor-remote-reply.d.ts +31 -4
- package/dist/commands/promisor-remote-reply.d.ts.map +1 -1
- package/dist/commands/promisor-remote.d.ts +8 -1
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +55 -7
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +18 -1
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/range-diff/range-diff-command.d.ts +37 -1
- package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +13 -1
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/ref-filter/for-each-ref-command.d.ts +3 -2
- package/dist/commands/ref-filter/for-each-ref-command.d.ts.map +1 -1
- package/dist/commands/ref-filter/index.d.ts +1 -0
- package/dist/commands/ref-filter/index.d.ts.map +1 -1
- package/dist/commands/ref-filter/peel-limit.d.ts +8 -0
- package/dist/commands/ref-filter/peel-limit.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-filter.d.ts.map +1 -1
- package/dist/commands/ref-filter/ref-format.d.ts +26 -1
- package/dist/commands/ref-filter/ref-format.d.ts.map +1 -1
- package/dist/commands/ref-filter/ref-listing-command.d.ts +9 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts.map +1 -1
- package/dist/commands/remote-transport.d.ts +27 -0
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/repack-command.d.ts +18 -2
- package/dist/commands/repack-command.d.ts.map +1 -1
- package/dist/commands/repo-command.d.ts +2 -7
- package/dist/commands/repo-command.d.ts.map +1 -1
- package/dist/commands/reset-command.d.ts +4 -1
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-list-command.d.ts +65 -0
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +3 -0
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-filenames.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +17 -0
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +12 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +21 -4
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/served-lazy-fetch.d.ts +61 -0
- package/dist/commands/served-lazy-fetch.d.ts.map +1 -0
- package/dist/commands/signing.d.ts +37 -4
- package/dist/commands/signing.d.ts.map +1 -1
- package/dist/commands/split-cmdline.d.ts +6 -0
- package/dist/commands/split-cmdline.d.ts.map +1 -0
- package/dist/commands/status-color-config.d.ts +33 -0
- package/dist/commands/status-color-config.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +15 -0
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-format.d.ts +46 -4
- package/dist/commands/status-format.d.ts.map +1 -1
- package/dist/commands/tag-command.d.ts +15 -1
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/tree-restore.d.ts +14 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/verify-command.d.ts +22 -2
- package/dist/commands/verify-command.d.ts.map +1 -1
- package/dist/commands/worktree-add-command.d.ts.map +1 -1
- package/dist/commands/worktree-overwrite-checks.d.ts +31 -6
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/{commands-CPceUCP2.js → commands-DT3VEv50.js} +15168 -16842
- package/dist/errors/commit-errors.d.ts +37 -1
- package/dist/errors/commit-errors.d.ts.map +1 -1
- package/dist/errors/git-api-error.d.ts +6 -0
- package/dist/errors/git-api-error.d.ts.map +1 -1
- package/dist/errors/index.js +44 -3
- package/dist/{fsck-tbrPZX2q.js → fsck-BZ508Elg.js} +2 -2
- package/dist/git-command.d.ts +33 -1
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +104 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/index.js +8 -7
- package/dist/{remote-transport-C0OSJtor.js → local-transport-D98U6p4d.js} +228 -692
- package/dist/{maintenance-run-command-UiSIaeP8.js → maintenance-run-command-DZFnbnbo.js} +2366 -108
- package/dist/remote-config/remote-config-store.d.ts +6 -0
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-transport-zvSqwpOB.js +4865 -0
- package/dist/results/cherry-pick-result.d.ts +4 -3
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- package/dist/results/diff-output.d.ts +7 -0
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/diff-words.d.ts +14 -3
- package/dist/results/diff-words.d.ts.map +1 -1
- package/dist/results/index.js +1 -1
- package/dist/results/line-prefix-sink.d.ts +50 -0
- package/dist/results/line-prefix-sink.d.ts.map +1 -0
- package/dist/results/merge-result.d.ts +4 -3
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +5 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/revert-result.d.ts +4 -3
- package/dist/results/revert-result.d.ts.map +1 -1
- package/dist/{results-CkS1p1CH.js → results-rF81cQse.js} +1788 -247
- package/dist/transport-command.d.ts +13 -0
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +21 -13
- package/src/commands/add-command.ts +15 -2
- package/src/commands/add-patch/patch-backend.ts +6 -44
- package/src/commands/archive/archive-command.ts +7 -3
- package/src/commands/archive/remote-archive-command.ts +45 -4
- package/src/commands/archive/upload-archive-writer.ts +34 -22
- package/src/commands/branch-command.ts +57 -4
- package/src/commands/bundle/bundle-format.ts +10 -2
- package/src/commands/bundle/bundle-uri-host.ts +71 -11
- package/src/commands/bundle/bundle-uri.ts +11 -4
- package/src/commands/bundle/bundle-verify.ts +4 -1
- package/src/commands/cat-file/batch-format.ts +17 -18
- package/src/commands/cat-file/cat-file-command.ts +182 -48
- package/src/commands/check-ignore-command.ts +110 -21
- package/src/commands/checkout-command.ts +149 -21
- package/src/commands/checkout-index-command.ts +2 -1
- package/src/commands/checkout-paths.ts +13 -0
- package/src/commands/cherry-pick-command.ts +9 -0
- package/src/commands/clean-interactive.ts +20 -74
- package/src/commands/clone-command.ts +102 -11
- package/src/commands/column/column-config.ts +63 -0
- package/src/commands/column/column-layout.ts +396 -0
- package/src/commands/column/index.ts +2 -0
- package/src/commands/column-command.ts +171 -0
- package/src/commands/comment-char-config.ts +42 -0
- package/src/commands/commit-command.ts +93 -18
- package/src/commands/config-command.ts +28 -0
- package/src/commands/credential-helper.ts +807 -0
- package/src/commands/default-branch.ts +57 -5
- package/src/commands/diff-color-config.ts +23 -10
- package/src/commands/diff-command.ts +25 -2
- package/src/commands/fast-export/fast-export-command.ts +661 -35
- package/src/commands/fast-export/fast-import-command.ts +694 -94
- package/src/commands/fast-export/fast-stream-support.ts +18 -1
- package/src/commands/fetch-command.ts +116 -16
- package/src/commands/fsck/fsck-object-checks.ts +3 -1
- package/src/commands/git-hooks.ts +96 -5
- package/src/commands/history-command.ts +952 -20
- package/src/commands/index-host.ts +51 -0
- package/src/commands/index-refresh.ts +121 -0
- package/src/commands/index.ts +9 -0
- package/src/commands/init-command.ts +57 -4
- package/src/commands/legacy-remotes.ts +4 -20
- package/src/commands/local-transport.ts +183 -18
- package/src/commands/log-command.ts +39 -1
- package/src/commands/log-output.ts +31 -4
- package/src/commands/ls-tree-command.ts +20 -12
- package/src/commands/maintenance-schedule-command.ts +418 -0
- package/src/commands/merge-command.ts +42 -8
- package/src/commands/merge-index-command.ts +202 -0
- package/src/commands/merge-one-file.ts +451 -0
- package/src/commands/merge-support.ts +169 -15
- package/src/commands/object-disk-info.ts +169 -0
- package/src/commands/octopus-merge.ts +37 -128
- package/src/commands/plumbing-input.ts +3 -1
- package/src/commands/promisor-remote-reply.ts +338 -56
- package/src/commands/promisor-remote.ts +39 -6
- package/src/commands/pull-command.ts +173 -27
- package/src/commands/push-command.ts +55 -6
- package/src/commands/range-diff/range-diff-command.ts +86 -3
- package/src/commands/read-tree-command.ts +2 -2
- package/src/commands/rebase-command.ts +46 -1
- package/src/commands/ref-filter/for-each-ref-command.ts +4 -3
- package/src/commands/ref-filter/index.ts +1 -0
- package/src/commands/ref-filter/peel-limit.ts +7 -0
- package/src/commands/ref-filter/ref-filter.ts +68 -7
- package/src/commands/ref-filter/ref-format.ts +85 -11
- package/src/commands/ref-filter/ref-listing-command.ts +30 -0
- package/src/commands/remote-command.ts +2 -2
- package/src/commands/remote-transport.ts +66 -3
- package/src/commands/repack-command.ts +75 -9
- package/src/commands/repo-command.ts +6 -70
- package/src/commands/reset-command.ts +11 -1
- package/src/commands/restore-command.ts +1 -0
- package/src/commands/rev-list-command.ts +205 -3
- package/src/commands/revert-command.ts +9 -0
- package/src/commands/revision-filenames.ts +32 -4
- package/src/commands/revision-range.ts +2 -2
- package/src/commands/revision-resolver.ts +21 -1
- package/src/commands/serve-repository.ts +42 -11
- package/src/commands/served-lazy-fetch.ts +164 -0
- package/src/commands/signing.ts +103 -12
- package/src/commands/split-cmdline.ts +32 -0
- package/src/commands/status-color-config.ts +92 -0
- package/src/commands/status-command.ts +50 -2
- package/src/commands/status-format.ts +198 -50
- package/src/commands/tag-command.ts +57 -2
- package/src/commands/tree-restore.ts +17 -0
- package/src/commands/verify-command.ts +84 -12
- package/src/commands/worktree-add-command.ts +2 -0
- package/src/commands/worktree-overwrite-checks.ts +75 -14
- package/src/errors/commit-errors.ts +52 -2
- package/src/errors/git-api-error.ts +7 -0
- package/src/git-command.ts +105 -4
- package/src/git.ts +153 -0
- package/src/remote-config/remote-config-store.ts +16 -0
- package/src/results/cherry-pick-result.ts +4 -3
- package/src/results/diff-output.ts +8 -0
- package/src/results/diff-words.ts +160 -32
- package/src/results/line-prefix-sink.ts +102 -0
- package/src/results/merge-result.ts +4 -3
- package/src/results/rebase-result.ts +5 -0
- package/src/results/revert-result.ts +4 -3
- package/src/transport-command.ts +79 -3
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git-merge-one-file (git-merge-one-file.sh, the same script in 2.43 and 2.5x): git's
|
|
3
|
+
* default per-path merge program, run by `git merge-index` for each unmerged path with its
|
|
4
|
+
* three stage ids, the path and the three modes (an absent stage empty).
|
|
5
|
+
*
|
|
6
|
+
* {@link planOneFile} is the script's `case` statement over the stages, computed in memory:
|
|
7
|
+
* what it prints, what it puts in the index and the worktree, and whether it fails. The
|
|
8
|
+
* octopus strategy applies the plan to its in-memory merge; {@link MergeOneFileCommand}
|
|
9
|
+
* applies it as the script does, through `git update-index` and `git checkout-index`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // git merge-one-file <base> <ours> <theirs> file 100644 100644 100644
|
|
14
|
+
* const r = await git.mergeOneFile().setArguments([base, ours, theirs, "file", "100644", "100644", "100644"]).call();
|
|
15
|
+
* // r.exitCode 0, r.stdout "Auto-merging file\n"
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import { type Blobs, type ObjectId } from "@statewalker/vcs-core";
|
|
19
|
+
import { type ConflictStyle } from "@statewalker/vcs-utils";
|
|
20
|
+
import type { Worktree } from "@statewalker/vcs-working-tree";
|
|
21
|
+
import { GitCommand } from "../git-command.js";
|
|
22
|
+
import type { PlumbingTextOutput } from "./check-ref-format-command.js";
|
|
23
|
+
import { CheckoutIndexCommand } from "./checkout-index-command.js";
|
|
24
|
+
import { UpdateIndexCommand } from "./update-index-command.js";
|
|
25
|
+
/** One path's stages as git-merge-one-file gets them: ids and octal modes, "" when absent. */
|
|
26
|
+
export interface OneFileStages {
|
|
27
|
+
path: string;
|
|
28
|
+
/** `$1 $2 $3`: the base, ours, theirs */
|
|
29
|
+
ids: [string, string, string];
|
|
30
|
+
/** `$5 $6 $7` */
|
|
31
|
+
modes: [string, string, string];
|
|
32
|
+
}
|
|
33
|
+
/** What git-merge-one-file does for one path. */
|
|
34
|
+
export type OneFilePlan =
|
|
35
|
+
/** Leaves the path unmerged (exit 1), printing `errors` */
|
|
36
|
+
{
|
|
37
|
+
kind: "fail";
|
|
38
|
+
output: string[];
|
|
39
|
+
errors: string[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* `git update-index --remove`: deleted in both, or in one and unchanged in the other;
|
|
43
|
+
* `unlink`: ours was there, its file is removed first (with its emptied directories)
|
|
44
|
+
*/
|
|
45
|
+
| {
|
|
46
|
+
kind: "remove";
|
|
47
|
+
output: string[];
|
|
48
|
+
unlink: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* `git update-index --add --cacheinfo`: added on one side or identically in both;
|
|
52
|
+
* `checkout`: the file written too (`git checkout-index -u -f`), refused when a file is
|
|
53
|
+
* already there (`untracked`)
|
|
54
|
+
*/
|
|
55
|
+
| {
|
|
56
|
+
kind: "add";
|
|
57
|
+
output: string[];
|
|
58
|
+
mode: string;
|
|
59
|
+
id: string;
|
|
60
|
+
checkout: boolean;
|
|
61
|
+
untracked: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A content merge: the worktree file is ours (`checkout-index --stage=2`) holding
|
|
65
|
+
* `content` (the merge's result, or ours when merge-file failed); `message` is the
|
|
66
|
+
* `ERROR: <message> in <path>` that leaves the path unmerged, "" when the merged file is
|
|
67
|
+
* added to the index (`git update-index`). `temporary` are unpack-file's files (ours,
|
|
68
|
+
* theirs, base) with what they hold, `errors` what was printed before the message.
|
|
69
|
+
*/
|
|
70
|
+
| {
|
|
71
|
+
kind: "merge";
|
|
72
|
+
output: string[];
|
|
73
|
+
errors: string[];
|
|
74
|
+
content: Uint8Array;
|
|
75
|
+
/** Ours could not be unpacked: `cat` of its empty name fails after the checkout */
|
|
76
|
+
oursMissing?: boolean;
|
|
77
|
+
/** The blob `content` is when it is ours unchanged */
|
|
78
|
+
contentId?: ObjectId;
|
|
79
|
+
message: string;
|
|
80
|
+
temporary: {
|
|
81
|
+
name: string;
|
|
82
|
+
content: Uint8Array;
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
/** What the planner reads. */
|
|
86
|
+
export interface OneFileContext {
|
|
87
|
+
blobs: Blobs;
|
|
88
|
+
style?: ConflictStyle;
|
|
89
|
+
/** The next temporary file name, as `mkstemp` gives unpack-file's (`.merge_file_XXXXXX`) */
|
|
90
|
+
tempName: () => string;
|
|
91
|
+
}
|
|
92
|
+
/** git-merge-one-file's `case "${1:-.}${2:-.}${3:-.}"`, computed in memory. */
|
|
93
|
+
export declare function planOneFile(ctx: OneFileContext, stages: OneFileStages): Promise<OneFilePlan>;
|
|
94
|
+
/** A name as `mkstemp` gives unpack-file's temporary files. */
|
|
95
|
+
export declare function mkstempName(): string;
|
|
96
|
+
/**
|
|
97
|
+
* `git merge-one-file <orig blob> <our blob> <their blob> <path> <orig mode> <our mode>
|
|
98
|
+
* <their mode>` (git-merge-one-file.sh), from the worktree's top.
|
|
99
|
+
*
|
|
100
|
+
* Trivial cases are resolved in the index: a path deleted in both or in one side and
|
|
101
|
+
* unchanged in the other is removed (with its file when ours had it), one added on one side
|
|
102
|
+
* or identically in both is added (and checked out when theirs). Otherwise the three are
|
|
103
|
+
* merged as `git merge-file` merges them (`merge.conflictStyle`, conflict markers labelled
|
|
104
|
+
* with unpack-file's temporary names): the worktree file is ours holding the result, added
|
|
105
|
+
* to the index when the merge is clean. Failures print git's `ERROR:` lines and give exit
|
|
106
|
+
* status 1, the path left unmerged. Never throws for git's failures: the result is the
|
|
107
|
+
* script's exit status, stdout and stderr.
|
|
108
|
+
*/
|
|
109
|
+
export declare class MergeOneFileCommand extends GitCommand<PlumbingTextOutput> {
|
|
110
|
+
private args;
|
|
111
|
+
/** The script's arguments (seven; an absent stage's id and mode empty). */
|
|
112
|
+
setArguments(args: readonly string[]): this;
|
|
113
|
+
call(): Promise<PlumbingTextOutput>;
|
|
114
|
+
/** @internal What the shared runner needs of this command. */
|
|
115
|
+
get oneFileHost(): OneFileHost;
|
|
116
|
+
}
|
|
117
|
+
/** @internal What running git-merge-one-file needs. */
|
|
118
|
+
export interface OneFileHost {
|
|
119
|
+
worktree: Worktree | undefined;
|
|
120
|
+
blobs: Blobs;
|
|
121
|
+
style: () => ConflictStyle;
|
|
122
|
+
updateIndex: () => UpdateIndexCommand;
|
|
123
|
+
checkoutIndex: () => CheckoutIndexCommand;
|
|
124
|
+
}
|
|
125
|
+
/** git-merge-one-file.sh over a worktree: the plan applied as the script does. */
|
|
126
|
+
export declare function runMergeOneFile(command: {
|
|
127
|
+
oneFileHost: OneFileHost;
|
|
128
|
+
}, args: readonly string[]): Promise<PlumbingTextOutput>;
|
|
129
|
+
//# sourceMappingURL=merge-one-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-one-file.d.ts","sourceRoot":"","sources":["../../src/commands/merge-one-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAiB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,wBAAwB,CAAC;AAGxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,8FAA8F;AAC9F,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,iBAAiB;IACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,iDAAiD;AACjD,MAAM,MAAM,WAAW;AACrB,2DAA2D;AACzD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE;AACtD;;;GAGG;GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE;AACvD;;;;GAIG;GACD;IACE,IAAI,EAAE,K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AM,WAAW,WAAW;IAC1B,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,aAAa,CAAC;IAC3B,WAAW,EAAE,MAAM,kBAAkB,CAAC;IACtC,aAAa,EAAE,MAAM,oBAAoB,CAAC;CAC3C;AAoCD,kFAAkF;AAClF,wBAAsB,eAAe,CACnC,OAAO,EAAE;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,EACrC,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAoG7B"}
|
|
@@ -11,11 +11,22 @@ import type { ObjectFormat } from "@statewalker/vcs-utils/hash";
|
|
|
11
11
|
import { type CacheTree, type Checkout, type IndexEntryOptions, type Staging, type WorkingCopy, type Worktree } from "@statewalker/vcs-working-tree";
|
|
12
12
|
import type { CommandRefs, CommandTrees } from "../git-command.js";
|
|
13
13
|
import type { OrtConflict } from "./ort-merge.js";
|
|
14
|
+
import type { RevisionResolver } from "./revision-resolver.js";
|
|
14
15
|
import type { SubmoduleUnpack } from "./submodule-unpack.js";
|
|
15
|
-
import { type TreeRestorePlan } from "./tree-restore.js";
|
|
16
|
+
import { type CheckoutRef, type TreeRestorePlan } from "./tree-restore.js";
|
|
16
17
|
import { type CheckedEntry } from "./worktree-overwrite-checks.js";
|
|
17
|
-
/**
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The blobs, links and gitlinks of a tree, by path (none for no tree).
|
|
20
|
+
*
|
|
21
|
+
* @param options.asIndex The entries as unpack-trees adds them to an index
|
|
22
|
+
* (`add_index_entry`'s `OK_TO_REPLACE`): a file the directory of its name follows in the
|
|
23
|
+
* same tree (a crafted tree holding both, which fsck calls `duplicateEntries`) is dropped
|
|
24
|
+
* once a file of that directory is read, so the map never holds a file/directory clash
|
|
25
|
+
* (webrun-vcs#247)
|
|
26
|
+
*/
|
|
27
|
+
export declare function flatTree(trees: CommandTrees, treeId: ObjectId | undefined, options?: {
|
|
28
|
+
asIndex?: boolean;
|
|
29
|
+
}): Promise<Map<string, CheckedEntry>>;
|
|
19
30
|
/**
|
|
20
31
|
* The trees `ids` as flat maps for a merge of them, as merge-ort reads them: a directory
|
|
21
32
|
* that every one of the trees holds with the same tree id is not read at all, it stands in
|
|
@@ -99,7 +110,21 @@ format: ObjectFormat, options?: {
|
|
|
99
110
|
*/
|
|
100
111
|
export declare function updateIndexCacheTree(staging: Staging, trees: CommandTrees,
|
|
101
112
|
/** the repository's object format, the cache-tree's trees are hashed in */
|
|
102
|
-
format: ObjectFormat
|
|
113
|
+
format: ObjectFormat,
|
|
114
|
+
/**
|
|
115
|
+
* An index no tree can hold (a file and a directory of one name) leaves the cache-tree as
|
|
116
|
+
* it is and gives verify_cache's lines here, as git's cache_tree_update fails and the
|
|
117
|
+
* command goes on (checkout); without it the update throws
|
|
118
|
+
*/
|
|
119
|
+
onClash?: (lines: string[]) => void): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* What git's `verify_cache` prints for an index of stage-0 entries holding a path and a path
|
|
122
|
+
* below it: one "You have both" line per such neighbouring pair in index order, at most ten,
|
|
123
|
+
* then "...".
|
|
124
|
+
*/
|
|
125
|
+
export declare function verifyCacheLines(entries: readonly {
|
|
126
|
+
path: string;
|
|
127
|
+
}[]): string[];
|
|
103
128
|
/** An index entry to write: path, blob, mode, stage and the file's stat. */
|
|
104
129
|
export type IndexEntryInput = IndexEntryOptions;
|
|
105
130
|
/**
|
|
@@ -218,6 +243,11 @@ export declare function switchTrees(ctx: MergeWriteContext, head: Map<string, Ch
|
|
|
218
243
|
export interface SwitchTreesOptions {
|
|
219
244
|
/** Names the operation in git's refusal messages */
|
|
220
245
|
action: "merge" | "checkout";
|
|
246
|
+
/**
|
|
247
|
+
* git's checkout metadata of the switch (unpack-trees' `o->meta`: the ref and commit
|
|
248
|
+
* checked out), handed with each file's blob to a long-running filter process
|
|
249
|
+
*/
|
|
250
|
+
metadata?: CheckoutRef;
|
|
221
251
|
/** Names the operation in restore failures */
|
|
222
252
|
operation: string;
|
|
223
253
|
/** The conflicts to stage */
|
|
@@ -273,4 +303,10 @@ export declare function firstPlainError(found: Partial<Record<Parameters<typeof
|
|
|
273
303
|
export declare function conflictsComment(paths: string[], unclean?: boolean): string;
|
|
274
304
|
/** The commit's first line (git's subject, as in `<abbrev> (<subject>)`). */
|
|
275
305
|
export declare function subjectOf(message: string): string;
|
|
306
|
+
/**
|
|
307
|
+
* MERGE_HEAD's entries as commits (git's `read_merge_heads` → `lookup_commit_reference`): a
|
|
308
|
+
* merged annotated tag is written by its own id (`write_merge_heads`) and peeled when read;
|
|
309
|
+
* an entry that peels to no commit is kept as written.
|
|
310
|
+
*/
|
|
311
|
+
export declare function peelMergeHeads(resolver: Pick<RevisionResolver, "peelTags">, ids: ObjectId[]): Promise<ObjectId[]>;
|
|
276
312
|
//# sourceMappingURL=merge-support.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-support.d.ts","sourceRoot":"","sources":["../../src/commands/merge-support.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,KAAK,EAGV,KAAK,QAAQ,EAEb,KAAK,aAAa,EAEnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,QAAQ,EAGb,KAAK,iBAAiB,EAItB,KAAK,OAAO,EAEZ,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"merge-support.d.ts","sourceRo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ACxF,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,gBAAgB,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,kBAAkB,EACrF,IAAI,EAAE,MAAM,GACX,MAAM,CAaR;AAqbD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,GACvE,MAAM,GAAG,SAAS,CAWpB;AAED,wDAAwD;AACxD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,UAAmB,GAAG,MAAM,CAGpF;AAED,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUjD;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,EAC5C,GAAG,EAAE,QAAQ,EAAE,GACd,OAAO,CAAC,QAAQ,EAAE,CAAC,CAOrB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an object takes on disk, as git's `odb_read_object_info_extended` reports it through
|
|
3
|
+
* `disk_sizep`: a packed object's entry (from its offset to the next entry's, or to the pack's
|
|
4
|
+
* trailer for the last), else its loose file's size. Packs are asked first (the repository's
|
|
5
|
+
* own in the pack set's lookup order, then its alternates'), then the loose files (its own,
|
|
6
|
+
* then its alternates'), as git's `oid_object_info_extended` looks objects up.
|
|
7
|
+
*
|
|
8
|
+
* `git repo structure` (its disk sizes), `git rev-list --disk-usage`, and the
|
|
9
|
+
* `%(objectsize:disk)`/`%(deltabase)` atoms of `cat-file` and the ref filter share it.
|
|
10
|
+
*/
|
|
11
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
12
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
13
|
+
/** The on-disk measures of a repository's objects. */
|
|
14
|
+
export interface ObjectDiskInfo {
|
|
15
|
+
/** The bytes `id` takes on disk; undefined when neither a pack nor a loose file holds it. */
|
|
16
|
+
diskSize(id: ObjectId): Promise<number | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* `delta_base_oid`: the base of `id`'s pack entry when it is stored as a delta (an
|
|
19
|
+
* OFS_DELTA's base named through the idx, a REF_DELTA's as written), read from the entry's
|
|
20
|
+
* header (the delta is never applied); the format's null id for a whole entry or a loose
|
|
21
|
+
* object; undefined when neither a pack nor a loose file holds it.
|
|
22
|
+
*/
|
|
23
|
+
deltaBase(id: ObjectId): Promise<ObjectId | undefined>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The on-disk measures of the objects of `workingCopy`'s object directory and its alternates.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const info = await objectDiskInfoOf(workingCopy);
|
|
31
|
+
* const bytes = (await info.diskSize(id)) ?? 0;
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function objectDiskInfoOf(workingCopy: WorkingCopy): Promise<ObjectDiskInfo>;
|
|
35
|
+
//# sourceMappingURL=object-disk-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-disk-info.d.ts","sourceRoot":"","sources":["../../src/commands/object-disk-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAEL,KAAK,QAAQ,EAId,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQjE,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;CACxD;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAwHxF"}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* Computed in memory: the caller writes the outcome (index, worktree, MERGE_HEAD) or, when
|
|
10
10
|
* the strategy gave up, leaves everything as it was (git's restore_state).
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import type { Blobs, ObjectId } from "@statewalker/vcs-core";
|
|
13
|
+
import type { ConflictStyle } from "@statewalker/vcs-utils";
|
|
14
14
|
import type { CommandCommits, CommandTrees } from "../git-command.js";
|
|
15
|
-
import {
|
|
15
|
+
import type { OrtConflict } from "./ort-merge.js";
|
|
16
16
|
import type { CheckedEntry } from "./worktree-overwrite-checks.js";
|
|
17
17
|
/** A head to merge and the name git's messages give it (as the user named it). */
|
|
18
18
|
export interface OctopusHead {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"octopus-merge.d.ts","sourceRoot":"","sources":["../../src/commands/octopus-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"octopus-merge.d.ts","sourceRoot":"","sources":["../../src/commands/octopus-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,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CAAC,EAAE,YAAY,CAAC;IAAC,MAAM,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC;AAExF,wBAAgB,QAAQ,CACtB,KAAK,EAAE,CAAC,YAAY,GAAG,SAAS,CAAC,EAAE,EACnC,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,UAAU,UAAO,GAChB,QAAQ,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CA0BnC;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,WAAW,EAAE,EACpB,YAAY,EAAE,MAAM,EAAE;AACtB;;;GAGG;AACH,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACf,GACL,OAAO,CAAC,cAAc,CAAC,CAmIzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plumbing-input.d.ts","sourceRoot":"","sources":["../../src/commands/plumbing-input.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,OAAO,GACX;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"plumbing-input.d.ts","sourceRoot":"","sources":["../../src/commands/plumbing-input.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,OAAO,GACX;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAkB7C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB,MAAM,GAAG,SAAS,CAEpB;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAK7E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GAAG,UAAU,EAC1B,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,MAAM,KAAK,GACvB,MAAM,EAAE,CAIV"}
|
|
@@ -6,8 +6,13 @@
|
|
|
6
6
|
* `partialCloneFilter` and `token` of a remote it already has), and which remotes its lazy
|
|
7
7
|
* fetches then try first ({@link acceptedPromisorRemotes}).
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* `promisor.acceptFromServerUrl` (git 2.56) is consulted first: an advertised URL matching one
|
|
10
|
+
* of its globs (`[<name>=]<url pattern>`, urlmatch.c's normalization, `*` within the host or
|
|
11
|
+
* the path) is accepted whatever `acceptFromServer` says, an unknown remote being created as
|
|
12
|
+
* `remote.<name>.url`/`promisor`/`advertisedAs` (the pattern's name, else
|
|
13
|
+
* `promisor-auto-<sanitized url>`, `-<n>` added while another URL holds the name). The filters
|
|
14
|
+
* the accepted remotes advertised make `--filter=auto` (git 2.54,
|
|
15
|
+
* {@link promisorAutoFilter}).
|
|
11
16
|
*
|
|
12
17
|
* @example
|
|
13
18
|
* ```ts
|
|
@@ -18,18 +23,40 @@
|
|
|
18
23
|
* ```
|
|
19
24
|
*/
|
|
20
25
|
import { type PromisorRemoteReply } from "@statewalker/vcs-transport";
|
|
21
|
-
import type
|
|
26
|
+
import { type WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
22
27
|
/**
|
|
23
28
|
* The promisor remotes a server's `promisor-remote` advertisement made this repository
|
|
24
29
|
* accept (git's `promisor_remote.accepted`, kept for the process): its lazy fetches try them
|
|
25
30
|
* before the other promisor remotes.
|
|
26
31
|
*/
|
|
27
32
|
export declare function acceptedPromisorRemotes(workingCopy: WorkingCopy): ReadonlySet<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Forgets what earlier `promisor-remote` answers accepted for this repository, as each git
|
|
35
|
+
* process starts with none (`promisor_remote.accepted`, `advertised_filter`): a fetch or clone
|
|
36
|
+
* calls it before it connects, so `--filter=auto` and the lazy fetches' order follow only the
|
|
37
|
+
* server it talks to now.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resetPromisorAcceptance(workingCopy: WorkingCopy): void;
|
|
28
40
|
/**
|
|
29
41
|
* The answer of `workingCopy` to a server's `promisor-remote` capability, given to
|
|
30
42
|
* `fetchFromConnection` (`FetchClientOptions.promisorRemote`). `stderr` gets git's lines
|
|
31
43
|
* (warnings, `Storing new filter from server ...`), each without its newline. Each call reads
|
|
32
44
|
* the configuration afresh: a stored field is not stored (nor told) again.
|
|
45
|
+
*
|
|
46
|
+
* `remember: false` answers as a child process of git would (a lazy fetch's `git fetch`): its
|
|
47
|
+
* acceptance changes the configuration it writes, not the remotes this repository's lazy
|
|
48
|
+
* fetches try first nor `--filter=auto`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function promisorRemoteReplyOf(workingCopy: WorkingCopy, stderr: (line: string) => void, options?: {
|
|
51
|
+
remember?: boolean;
|
|
52
|
+
}): PromisorRemoteReply;
|
|
53
|
+
/**
|
|
54
|
+
* git's `promisor_remote_construct_filter`: the filter `--filter=auto` stands for, from the
|
|
55
|
+
* promisor remotes (in config order) a server's `promisor-remote` made this repository accept
|
|
56
|
+
* that advertised one, expanded (`blob:limit=5k` as `blob:limit=5120`); undefined when none
|
|
57
|
+
* did. An invalid one is skipped with git's warning.
|
|
58
|
+
*
|
|
59
|
+
* @throws Error where git hits its `BUG()`: two accepted remotes advertising valid filters
|
|
33
60
|
*/
|
|
34
|
-
export declare function
|
|
61
|
+
export declare function promisorAutoFilter(workingCopy: WorkingCopy, stderr: (line: string) => void): string | undefined;
|
|
35
62
|
//# sourceMappingURL=promisor-remote-reply.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promisor-remote-reply.d.ts","sourceRoot":"","sources":["../../src/commands/promisor-remote-reply.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"promisor-remote-reply.d.ts","sourceRoot":"","sources":["../../src/commands/promisor-remote-reply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,+BAA+B,CAAC;AAqBjF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAErF;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAItE;AAUD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC9B,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,mBAAmB,CAoGrB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,MAAM,GAAG,SAAS,CAsBpB"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
import { type ObjectPromisor, type PromisorFetcher } from "@statewalker/vcs-core";
|
|
23
|
-
import { type Credentials, type GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
23
|
+
import { type Credentials, type GitTransportRegistry, type HttpCredentialHelper } from "@statewalker/vcs-transport";
|
|
24
24
|
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
25
25
|
import { RemoteConfigStore } from "../remote-config/index.js";
|
|
26
26
|
/** A promisor remote (git's `struct promisor_remote`). */
|
|
@@ -56,6 +56,13 @@ export interface PromisorFetcherOptions {
|
|
|
56
56
|
credentials?: Credentials;
|
|
57
57
|
headers?: Record<string, string>;
|
|
58
58
|
timeout?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Asked for HTTP credentials after a 401, per URL (git's child fetch reads
|
|
61
|
+
* `credential.helper`): an answer for one host never goes to another
|
|
62
|
+
*/
|
|
63
|
+
credentialHelper?: HttpCredentialHelper;
|
|
64
|
+
/** git's `warning:` lines of the HTTP client (`rate limited, waiting ...`) */
|
|
65
|
+
warningCallback?: (line: string) => void;
|
|
59
66
|
/**
|
|
60
67
|
* git's behaviour to follow: 2.43 knows no `GIT_NO_LAZY_FETCH` (default: the host's hook
|
|
61
68
|
* runner's, else 2.56)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promisor-remote.d.ts","sourceRoot":"","sources":["../../src/commands/promisor-remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,WAAW,EAKhB,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAK9D,0DAA0D;AAC1D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc,EAAE,CAsC1E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,IAAI,CASN;AAED,wCAAwC;AACxC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAEnE;AAED,sEAAsE;AACtE,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED,wFAAwF;AACxF,eAAO,MAAM,2BAA2B,uEAC8B,CAAC;AAEvE;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,OAAO,GAAE,sBAA2B,GACnC,eAAe,
|
|
1
|
+
{"version":3,"file":"promisor-remote.d.ts","sourceRoot":"","sources":["../../src/commands/promisor-remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,WAAW,EAKhB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC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M/E"}
|
|
@@ -5,7 +5,22 @@ import type { PullResult } from "../results/pull-result.js";
|
|
|
5
5
|
import type { CommitEditor } from "./commit-command.js";
|
|
6
6
|
import { TagOption } from "./fetch-command.js";
|
|
7
7
|
import { type CleanupMode } from "./message-cleanup.js";
|
|
8
|
+
import { type InteractiveHandler } from "./rebase-command.js";
|
|
8
9
|
import { type FetchRecurseSubmodules } from "./submodule-fetch.js";
|
|
10
|
+
/**
|
|
11
|
+
* How a pull reconciles (rebase.c's `enum rebase_type`): merge (false), rebase (true),
|
|
12
|
+
* rebase keeping merges (`merges`, `--rebase-merges`), or rebase interactively
|
|
13
|
+
* (`interactive`, `--interactive`).
|
|
14
|
+
*/
|
|
15
|
+
export type PullRebaseMode = boolean | "merges" | "interactive";
|
|
16
|
+
/**
|
|
17
|
+
* rebase.c's `rebase_parse_value`: a boolean, `merges`/`m`, `interactive`/`i`; undefined
|
|
18
|
+
* for anything else, with git's error line for `preserve`/`p` (superseded by `merges`).
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseRebaseValue(value: string | undefined): {
|
|
21
|
+
mode?: PullRebaseMode;
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
9
24
|
/**
|
|
10
25
|
* Pull changes from a remote repository.
|
|
11
26
|
*
|
|
@@ -48,8 +63,10 @@ export declare class PullCommand extends GuardedTransportCommand<PullResult> {
|
|
|
48
63
|
private remoteGiven;
|
|
49
64
|
/** The refspecs after the remote (`git pull <remote> <refspec>...`) */
|
|
50
65
|
private refSpecs;
|
|
51
|
-
/** `--rebase` / `--no-rebase`; undefined: branch.<name>.rebase, then pull.rebase */
|
|
66
|
+
/** `--rebase[=<mode>]` / `--no-rebase`; undefined: branch.<name>.rebase, then pull.rebase */
|
|
52
67
|
private rebase?;
|
|
68
|
+
/** The editors of an interactive rebase (`--rebase=interactive`) */
|
|
69
|
+
private interactiveHandler?;
|
|
53
70
|
/** `--verify-signatures` / `--no-verify-signatures`, passed to the merge */
|
|
54
71
|
private verifySignatures?;
|
|
55
72
|
/** `--autostash` / `--no-autostash`; undefined: pull.autoStash, then rebase.autoStash */
|
|
@@ -128,15 +145,31 @@ export declare class PullCommand extends GuardedTransportCommand<PullResult> {
|
|
|
128
145
|
* configuration decides, as in git: `branch.<name>.rebase`, else `pull.rebase`, else merge
|
|
129
146
|
* (a pull that cannot fast-forward then refuses unless `pull.ff` or a fast-forward mode
|
|
130
147
|
* is given: git's "Need to specify how to reconcile divergent branches.").
|
|
131
|
-
* Only this option puts `--rebase` in the reflog lines (git's are the command
|
|
148
|
+
* Only this option puts `--rebase[=<mode>]` in the reflog lines (git's are the command
|
|
149
|
+
* line's).
|
|
132
150
|
*
|
|
133
|
-
*
|
|
151
|
+
* `"merges"` is `--rebase=merges` (the rebase keeps the branch's merges, `--rebase-merges`),
|
|
152
|
+
* `"interactive"` is `--rebase=interactive` (the rebase runs interactively: the handler of
|
|
153
|
+
* {@link runInteractively}, else git's sequence editor program). The configuration takes
|
|
154
|
+
* the same values (`merges`/`m`, `interactive`/`i`); any other dies as git's does.
|
|
155
|
+
*
|
|
156
|
+
* The rebase goes onto what was fetched; its upstream is git's fork point of the branch
|
|
157
|
+
* (`git merge-base --fork-point` of the upstream's tracking ref, read before the fetch),
|
|
158
|
+
* so commits the upstream rewrote away are not replayed.
|
|
159
|
+
*
|
|
160
|
+
* @param rebase Whether to use rebase, or the rebase mode
|
|
134
161
|
*/
|
|
135
|
-
setRebase(rebase:
|
|
162
|
+
setRebase(rebase: PullRebaseMode): this;
|
|
136
163
|
/**
|
|
137
164
|
* Whether rebase mode was requested with {@link setRebase} (the configuration aside).
|
|
138
165
|
*/
|
|
139
166
|
isRebase(): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* The editors of an interactive rebasing pull (`--rebase=interactive`, `pull.rebase=
|
|
169
|
+
* interactive`; see `RebaseCommand.runInteractively`). Without one the rebase runs git's
|
|
170
|
+
* sequence editor program (`GIT_SEQUENCE_EDITOR`, `sequence.editor`, ...).
|
|
171
|
+
*/
|
|
172
|
+
runInteractively(handler: InteractiveHandler): this;
|
|
140
173
|
/**
|
|
141
174
|
* Stash local changes away and apply them again after the pull (`--autostash` /
|
|
142
175
|
* `--no-autostash`). Default `pull.autoStash`, then for a rebase `rebase.autoStash` (a
|
|
@@ -247,7 +280,6 @@ export declare class PullCommand extends GuardedTransportCommand<PullResult> {
|
|
|
247
280
|
* Execute the pull operation.
|
|
248
281
|
*
|
|
249
282
|
* @returns Pull result with fetch and merge results
|
|
250
|
-
* @throws NoHeadError if HEAD is detached and no refspec is given
|
|
251
283
|
* @throws GitApiError with git's stderr where git's pull dies (exit 128, or 1 when nothing
|
|
252
284
|
* fetched is to be merged)
|
|
253
285
|
*/
|
|
@@ -303,10 +335,26 @@ export declare class PullCommand extends GuardedTransportCommand<PullResult> {
|
|
|
303
335
|
*/
|
|
304
336
|
private configFastForward;
|
|
305
337
|
/**
|
|
306
|
-
* git's config_get_rebase: `branch.<name>.rebase
|
|
307
|
-
*
|
|
338
|
+
* git's config_get_rebase: `branch.<name>.rebase` (on a branch), else `pull.rebase`, read
|
|
339
|
+
* by rebase_parse_value. Undefined when neither is set.
|
|
340
|
+
*
|
|
341
|
+
* @throws GitApiError `fatal: invalid value for '<key>': '<value>'` (exit 128), after
|
|
342
|
+
* rebase_parse_value's `preserve` error line
|
|
308
343
|
*/
|
|
309
344
|
private configRebase;
|
|
345
|
+
/**
|
|
346
|
+
* pull.c's get_rebase_fork_point: `git merge-base --fork-point <tracking> <branch>`, where
|
|
347
|
+
* the tracking ref is the first refspec's (get_tracking_branch) or, without refspec, the
|
|
348
|
+
* branch's upstream when the pull is from the branch's remote (get_upstream_branch).
|
|
349
|
+
* Undefined when there is none or the search fails (git hides its stderr).
|
|
350
|
+
*/
|
|
351
|
+
private rebaseForkPoint;
|
|
352
|
+
/**
|
|
353
|
+
* get_rebase_newbase_and_upstream's upstream: the fork point, unless the octopus merge
|
|
354
|
+
* base of HEAD, the fetched head and the fork point is the fork point itself; else the
|
|
355
|
+
* fetched head.
|
|
356
|
+
*/
|
|
357
|
+
private rebaseUpstream;
|
|
310
358
|
/**
|
|
311
359
|
* Whether `ancestor` is an ancestor of `commit` (git's repo_is_descendant_of), by git's
|
|
312
360
|
* date-ordered paint walk, which stops once the sides meet.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull-command.d.ts","sourceRoot":"","sources":["../../src/commands/pull-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,uBAAuB,CAAC;AAKhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EACL,eAAe,EAGf,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAgB,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"pull-command.d.ts","sourceRoot":"","sources":["../../src/commands/pull-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,uBAAuB,CAAC;AAKhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EACL,eAAe,EAGf,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAgB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO7D,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAE,KAAK,sBAAsB,EAA2B,MAAM,sBAAsB,CAAC;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0C;IAC1C,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAIrC;IAED;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;IAED,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED;;;;;;;;OAQG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,sBAAsB,GAAG,IAAI,CAIpE;IAED;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,CAoWhC;IAED,iFAAiF;IACjF,OAAO,CAAC,uBAAuB;IAa/B,0FAA0F;YAC5E,gBAAgB;IAuB9B;;;OAGG;IACH,OAAO,CAAC,MAAM;IAad;;;OAGG;IACH,OAAO,CAAC,WAAW;IAuCnB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAqBpB,iFAAiF;YACnE,eAAe;IAM7B;;;;;;;;;OASG;YACW,oBAAoB;IAyBlC;;;OAGG;YACW,uBAAuB;IAarC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAuD5B,OAAO,CAAC,MAAM;IAId;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAUzB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAkBpB;;;;;OAKG;YACW,eAAe;IAsB7B;;;;OAIG;YACW,cAAc;IAc5B;;;OAGG;YACW,UAAU;CAMzB"}
|
|
@@ -78,6 +78,7 @@ export declare class PushCommand extends TransportCommand<PushResult> {
|
|
|
78
78
|
private useBitmaps?;
|
|
79
79
|
private pushOptions;
|
|
80
80
|
private receivePack?;
|
|
81
|
+
private localReceiveMaxObjectSize?;
|
|
81
82
|
private prune;
|
|
82
83
|
private streamRequestBody?;
|
|
83
84
|
/** Leases (an entry without a ref: every other pushed ref at its tracking value) */
|
|
@@ -324,6 +325,19 @@ export declare class PushCommand extends TransportCommand<PushResult> {
|
|
|
324
325
|
* Get the receive-pack executable name.
|
|
325
326
|
*/
|
|
326
327
|
getReceivePack(): string | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* The largest object a local repository's receive-pack (run in process for a path remote)
|
|
330
|
+
* takes in the pushed pack, in bytes: a pack holding a larger one is refused as git reports
|
|
331
|
+
* its child's death (`unpack index-pack abnormal exit` / `unpack-objects abnormal exit`,
|
|
332
|
+
* every ref `unpacker error`). JGit's `ReceivePack.setMaxObjectSizeLimit`; git has no such
|
|
333
|
+
* setting, so no config key gives it. Absent: 1 GiB. A remote server applies its own.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```ts
|
|
337
|
+
* await git.push().setRemote("../bare.git").setLocalReceiveMaxObjectSize(1 << 20).call();
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
setLocalReceiveMaxObjectSize(bytes: number | undefined): this;
|
|
327
341
|
/**
|
|
328
342
|
* Execute the push.
|
|
329
343
|
*
|
|
@@ -392,7 +406,10 @@ export declare class PushCommand extends TransportCommand<PushResult> {
|
|
|
392
406
|
/**
|
|
393
407
|
* get_commons_through_negotiation: `git fetch --negotiate-only --negotiation-tip=<id>...
|
|
394
408
|
* <url>` run as git's child, its acknowledged commits the commons; its warnings (stderr)
|
|
395
|
-
* passed on, and no commons when it fails (git's "push negotiation failed").
|
|
409
|
+
* passed on, and no commons when it fails (git's "push negotiation failed"). git 2.56 passes
|
|
410
|
+
* the pushed remote's `remote.<name>.negotiationRestrict` values in place of the pushed ids
|
|
411
|
+
* when it has any, and its `negotiationInclude` values as `--negotiation-include`; with
|
|
412
|
+
* nothing to pass the child is not run (undefined).
|
|
396
413
|
*/
|
|
397
414
|
private negotiateCommons;
|
|
398
415
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-command.d.ts","sourceRoot":"","sources":["../../src/commands/push-command.ts"],"names":[],"mappings":"AAuCA,OAAO,EA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